예제 #1
0
 private static Task <TimeSpan> RunBlockingCollectionTestCase(PerformanceTest test, Func <Task> simulatedWorkload)
 => test.Run(BlockingCollectionTestCase.CreateChannel,
             channel => BlockingCollectionTestCase.Consume(channel, simulatedWorkload),
             BlockingCollectionTestCase.Produce,
             BlockingCollectionTestCase.CompleteChannel);
예제 #2
0
 private static Task <TimeSpan> RunDataFlowTestCase(PerformanceTest test, Func <Task> simulatedWorkload)
 => test.Run(DataFlowTestCase.CreateChannel,
             channel => DataFlowTestCase.Consume(channel, simulatedWorkload),
             DataFlowTestCase.Produce,
             DataFlowTestCase.CompleteChannel);
예제 #3
0
 private static Task <TimeSpan> RunChannelProducerConsumerTestCase(PerformanceTest test, Func <Task> simulatedWorkload)
 => test.Run(ChannelProducerConsumerTestCase.CreateChannel,
             channel => ChannelProducerConsumerTestCase.Consume(channel, simulatedWorkload),
             ChannelProducerConsumerTestCase.Produce,
             ChannelProducerConsumerTestCase.CompleteChannel);