コード例 #1
0
 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);
     }
 }
コード例 #2
0
 public void Dispose()
 {
     _stopWatch.Stop();
     MainLog.BenchLog(
         $"END: {_stopWatch.Elapsed.ToString("mm':'ss':'fff")} [{_caller}] {_message} ({AdditionalInfo})");
 }