public void Dispose() { var elapsed = _metric.GetElapsed(); _metric.Ticks = elapsed.Ticks; _metric.Milliseconds = elapsed.TotalMilliseconds; _metrics.Log(_metric.Message + " completed in " + _metric.Milliseconds + "ms" + (_metric.Milliseconds > 100 ? " (SLOW)" : "")); }
public MeasureDisposer(IMetricsBase metrics, Metric metric) { _metrics = metrics; _metric = metric; _metrics.Log(metric.Message + " starting "); }