示例#1
0
 // 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]);
         }
     }
 }
示例#2
0
 public CallStats(int samples, int errorSamples, Func <long[], TimingPercentileStats> statsCalculator, Func <long[], TimingPercentileStats> errorStatsCalculator)
 {
     SunnyDay = new CallTimingStatsCollector(samples, statsCalculator);
     RainyDay = new CallTimingStatsCollector(errorSamples, errorStatsCalculator);
 }