public Bencher(string message, string caller, string startInfo = null) { _message = message; _caller = caller; _stopWatch = Stopwatch.StartNew(); MainLog.BenchLog($"START: [{_caller}] {_message}"); if (startInfo != null) { MainLog.BenchLog(startInfo); } }
public void Dispose() { _stopWatch.Stop(); MainLog.BenchLog( $"END: {_stopWatch.Elapsed.ToString("mm':'ss':'fff")} [{_caller}] {_message} ({AdditionalInfo})"); }