// move this outside of the test - an external code should query the test for its call stats private static void AppendStats(CallTimingStatsCollector tstats, StringBuilder sb) { foreach (var stat in tstats.PercentileStats) { sb.AppendLine("Time: " + stat.Time); for (int i = 0; i < stat.Centile.Length; i++) { sb.AppendLine(stat.Centile[i] + ": " + stat.AvgTiming[i]); } } }
public CallStats(int samples, int errorSamples, Func <long[], TimingPercentileStats> statsCalculator, Func <long[], TimingPercentileStats> errorStatsCalculator) { SunnyDay = new CallTimingStatsCollector(samples, statsCalculator); RainyDay = new CallTimingStatsCollector(errorSamples, errorStatsCalculator); }