コード例 #1
0
        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)" : ""));
        }
コード例 #2
0
 public MeasureDisposer(IMetricsBase metrics, Metric metric)
 {
     _metrics = metrics;
     _metric  = metric;
     _metrics.Log(metric.Message + " starting ");
 }