예제 #1
0
        public async Task Run(int requestCount, CancellationToken ct)
        {
            Statistics statistics = null;

            CallResult[] results = null;
            using (statistics = new Statistics(nameof(UnaryBenchmarkScenario) + requestCount))
            {
                results = await PlainTextAsync(requestCount, ct);
            }

            _reporter.AddDetail(nameof(PlainTextAsync), nameof(MethodType.Unary), _reporter, statistics, results);
        }
        public async Task Run(int requestCount, int waitMilliseconds, CancellationToken ct)
        {
            Statistics statistics = null;

            CallResult[] results = null;
            using (statistics = new Statistics(nameof(UnaryBenchmarkScenario) + requestCount))
            {
                results = await ProcessAsync(requestCount, waitMilliseconds, ct);
            }

            _reporter.AddDetail(nameof(ProcessAsync), nameof(MethodType.DuplexStreaming), _reporter, statistics, results);
        }