DelegateProfilerTests CheckTotalDurationOfDoingSomethingSlowAThousandTimes 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 CheckTotalDurationOfDoingSomethingSlowAThousandTimes()
Examples

[Test, Category("Slow")]
public void CheckTotalDurationOfDoingSomethingSlowAThousandTimes()
{
    var profiler = new DelegateProfiler(() => Thread.Sleep(1));
    int totalDuration = profiler.TotalDurationInMilliseconds;
    Assert.IsTrue(totalDuration > 950);
    Console.WriteLine(totalDuration + " milliseconds for 1,000 iterations");
}
See Also