public void OpenFL_Program_Initialization_Test() { TestSetup.SetupTestingSession(); OpenFLBenchmarks.RunProgramInitBenchmark("_test", GetFiles(), IO_BENCHMARK_ITERATIONS); }
public override bool Run(string[] args) { TypeAccumulator.RegisterAssembly(typeof(OpenFLDebugConfig).Assembly); Debug.DefaultInitialization(); Runner.AddCommand(new HelpCommand(new DefaultHelpCommand(true))); SetSettingsCommand cmd = SetSettingsCommand.CreateSettingsCommand("Settings", Settings); Runner.AddCommand(new ListSettingsCommand(cmd)); Runner.AddCommand(cmd); Runner.AddCommand(new MultiThreadFlagCommand()); Runner.AddCommand(new AddToCheckPipelineCommand()); Runner.RunCommands(args); if (!DoExecute) { Console.ReadLine(); return(true); } string[] checkTypesStr = Settings.CheckPipeline.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); List <Type> checkTypes = new List <Type>(); foreach (string s in checkTypesStr) { List <Type> r = TypeAccumulator <FLProgramCheck> .GetTypesByName(s); if (r.Count != 1) { Console.Write(""); } checkTypes.AddRange(r); } ExtPPDebugConfig.Settings.MinSeverity = Verbosity.Silent; OpenFLDebugConfig.Settings.MinSeverity = Verbosity.Level1; OpenCLDebugConfig.Settings.MinSeverity = Verbosity.Silent; List <string> files = GetFileList(); Logger.Log(LogType.Log, "------------------------Run Execution Started------------------------", 1); for (int i = 0; i < Settings.TotalRepetitions; i++) { OpenFLBenchmarks.InitializeTestRun(Settings.PerformanceFolder); Logger.Log(LogType.Log, $"------------------------Run {i} Started------------------------", 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunParserInitBenchmark("_run" + i, Settings.InitIterations, Settings.PerformanceFolder, true, true), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunParserProcessBenchmark("_run" + i, files, Settings.ParsingIterations, Settings.PerformanceFolder, checkTypes.ToArray(), UseMultiThread), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunProgramInitBenchmark("_run" + i, files, Settings.InitIterations, Settings.PerformanceFolder, checkTypes.ToArray(), true), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunProgramSerializationBenchmark("_run" + i, files, Settings.IOIterations, Settings.ExtraSteps.Split(new[] { ';' }), Settings.PerformanceFolder, checkTypes.ToArray(), true), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunProgramDeserializationBenchmark("_run" + i, files, Settings.IOIterations, Settings.PerformanceFolder, checkTypes.ToArray(), true), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunParsedFLExecutionBenchmark(Settings.WarmProgram, "_run" + i, files, Settings.ExecutionIterations, Settings.PerformanceFolder, checkTypes.ToArray(), true, 2), 1); Logger.Log(LogType.Log, OpenFLBenchmarks.RunDeserializedFLExecutionBenchmark("_run" + i, files, Settings.ExecutionIterations, Settings.PerformanceFolder, checkTypes.ToArray(), true, 2), 1); OpenFLBenchmarks.FinalizeTestRun(Settings.PerformanceFolder); Logger.Log(LogType.Log, $"------------------------Run {i} Finished------------------------", 1); } Logger.Log(LogType.Log, "------------------------Run Execution Finished------------------------", 1); return(true); }