private static void RunTestForType(Type perfTestType, bool shouldOpen) { var isThroughputTest = typeof(IThroughputTest).IsAssignableFrom(perfTestType); var isLatencyTest = typeof(ILatencyTest).IsAssignableFrom(perfTestType); var typeName = perfTestType.Name; if (!isThroughputTest && !isLatencyTest) { Console.WriteLine($"*** ERROR *** Unable to determine the runner to use for this type ({typeName})"); return; } //Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal; if (isThroughputTest) { var session = new ThroughputTestSession(perfTestType); session.Run(); session.GenerateAndOpenReport(shouldOpen); } if (isLatencyTest) { var session = new LatencyTestSession(perfTestType); session.Run(); session.GenerateAndOpenReport(shouldOpen); } }
private static void RunTestForType(Type perfTestType, Options options) { var isThroughputTest = typeof(IThroughputTest).IsAssignableFrom(perfTestType); var isLatencyTest = typeof(ILatencyTest).IsAssignableFrom(perfTestType); //Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal; if (isThroughputTest) { var session = new ThroughputTestSession(perfTestType); session.Run(options); session.Report(options); } if (isLatencyTest) { var session = new LatencyTestSession(perfTestType); session.Run(options); session.Report(options); } }