DelegateProfilerTests CheckTotalDurationOfDoingSomethingFastAMillionTimes Method Delta Engine Documentation

Namespace: DeltaEngine.Profiling.Tests
Assembly: DeltaEngine.Profiling.Tests (in DeltaEngine.Profiling.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void CheckTotalDurationOfDoingSomethingFastAMillionTimes()
Examples

[Test, Category("Slow")]
public void CheckTotalDurationOfDoingSomethingFastAMillionTimes()
{
    var profiler = new DelegateProfiler(DoSomeMaths, 1000000);
    int duration = profiler.TotalDurationInMilliseconds;
    Assert.IsTrue(duration > 5);
    Console.WriteLine(duration + " milliseconds for 1,000,000 iterations");
}
See Also