示例#1
0
        private XunitTestRunner CreateRunner(int iteration, BenchmarkTestCase testCase, bool warmup)
        {
            var iterations = warmup ? testCase.WarmupIterations : testCase.Iterations;
            var name       = $"{DisplayName} [Stage: {(warmup ? "Warmup" : "Collection")}] [Iteration: {iteration}/{iterations}]";

            return(new BenchmarkTestRunner(
                       new XunitTest(TestCase, name),
                       testCase.MetricCollector,
                       MessageBus,
                       TestClass,
                       ConstructorArguments,
                       TestMethod,
                       TestMethodArguments,
                       SkipReason,
                       BeforeAfterAttributes,
                       Aggregator,
                       CancellationTokenSource));
        }
示例#2
0
 public BenchmarkTestCaseRunner(
     BenchmarkTestCase testCase,
     string displayName,
     string skipReason,
     object[] constructorArguments,
     object[] testMethodArguments,
     IMessageBus messageBus,
     ExceptionAggregator aggregator,
     CancellationTokenSource cancellationTokenSource,
     IMessageSink diagnosticMessageSink)
     : base(
         testCase,
         displayName,
         skipReason,
         constructorArguments,
         testMethodArguments,
         messageBus,
         aggregator,
         cancellationTokenSource)
 {
     TestCase = testCase;
     _diagnosticMessageSink = diagnosticMessageSink;
 }
 public BenchmarkTestCaseRunner(
     BenchmarkTestCase testCase,
     string displayName,
     string skipReason,
     object[] constructorArguments,
     object[] testMethodArguments,
     IMessageBus messageBus,
     ExceptionAggregator aggregator,
     CancellationTokenSource cancellationTokenSource,
     IMessageSink diagnosticMessageSink)
     : base(
         testCase,
         displayName,
         skipReason,
         constructorArguments,
         testMethodArguments,
         messageBus,
         aggregator,
         cancellationTokenSource)
 {
     TestCase = testCase;
     _diagnosticMessageSink = diagnosticMessageSink;
 }
        private XunitTestRunner CreateRunner(int iteration, BenchmarkTestCase testCase, bool warmup)
        {
            var iterations = warmup ? testCase.WarmupIterations : testCase.Iterations;
            var name = $"{DisplayName} [Stage: {(warmup ? "Warmup" : "Collection")}] [Iteration: {iteration}/{iterations}]";

            return new BenchmarkTestRunner(
                new XunitTest(TestCase, name),
                testCase.MetricCollector,
                MessageBus,
                TestClass,
                ConstructorArguments,
                TestMethod,
                TestMethodArguments,
                SkipReason,
                BeforeAfterAttributes,
                Aggregator,
                CancellationTokenSource);
        }