Report() 공개 메소드

Adds the current value to the statistics.
public Report ( double current ) : void
current double The current value.
리턴 void
예제 #1
0
        private Stats Benchmark_ReportIndividualIterations(int numberOfIterations, Stats stats)
        {
            for (int i = 0; i < numberOfIterations; i++)
            {
                Stopwatch stopwatch = Stopwatch.StartNew();

                Action.Invoke();

                stopwatch.Stop();

                stats.Report(stopwatch.ElapsedMilliseconds);
            }

            return stats;
        }
예제 #2
0
        private Stats Benchmark(int numberOfIterations, Stats stats)
        {
            Stopwatch stopwatch = Stopwatch.StartNew();

            for (int i = 0; i < numberOfIterations; i++)
            {
                Action.Invoke();
            }

            stopwatch.Stop();

            stats.Report(stopwatch.ElapsedMilliseconds);

            stats.TotalIterations = numberOfIterations;
            stats.Min = stats.Max = stats.Average;

            return stats;
        }