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