public void SingleThreaded_LowVolume_Baseline_Increment() { var total = 0; using (var timer = new LongOperationLoggingStopwatch("test", _ => { }, new LongLoggingSettings { InnerOperationLoggingPeriod = 1 })) { for (int i = 0; i < 1_000_000; i++) { total++; } } Assert.That(total == 1_000_000); }
public void SingleThreaded_LowVolume_OverheadTest_WithLogging() { var total = 0; using (var timer = new LongOperationLoggingStopwatch("test", _ => { }, new LongLoggingSettings { InnerOperationLoggingPeriod = 1 })) { for (int i = 0; i < 1_000_000; i++) { using (timer.TimeInnerOperation()) { total++; } } } Assert.That(total == 1_000_000); }