Exemplo n.º 1
0
        protected async Task ConnectionStatEventerCallback(
            IDictionary <string, object> stepParameters,
            IDictionary <string, object> pluginParameters, IList <IRpcClient> clients)
        {
            var results = await Task.WhenAll(from client in clients
                                             select client.QueryAsync(stepParameters));

            // Merge statistics
            var merged = SignalRUtils.MergeStatistics(results, _latencyMax, _latencyStep);
            var connectionStatMerged = SignalRUtils.MergeConnectionStatistics(results, _percentileList.ToArray());

            merged = merged.Union(connectionStatMerged).ToDictionary(entry => entry.Key, entry => entry.Value);
            PrintAndSave(merged);
        }