コード例 #1
0
        /// <inheritdoc />
        public TimerValue GetValue(bool resetMetric = false)
        {
            var total = resetMetric ? _totalRecordedTime.GetAndReset() : _totalRecordedTime.GetValue();

            return(new TimerValue(_meter.GetValue(resetMetric), _histogram.GetValue(resetMetric), _activeSessionsCounter.GetValue(), total,
                                  TimeUnit.Nanoseconds));
        }
コード例 #2
0
 /// <inheritdoc />
 public TimerValue GetValue(bool resetMetric = false)
 {
     return(new TimerValue(
                _meter.GetValue(resetMetric),
                _histogram.GetValue(resetMetric),
                _activeSessionsCounter.GetValue(),
                TimeUnit.Nanoseconds));
 }
コード例 #3
0
 /// <inheritdoc />
 public BucketTimerValue GetValue(bool resetMetric = false)
 {
     return(new BucketTimerValue(
                _meter.GetValue(resetMetric),
                _histogram.GetValue(resetMetric),
                _activeSessionsCounter.GetValue(),
                _timeUnit));
 }
コード例 #4
0
        /// <inheritdoc />
        public TimerValue GetValue(bool resetMetric = false)
        {
            var activeSessions = resetMetric
                ? _activeSessionsCounter.GetAndReset()
                : _activeSessionsCounter.GetValue();

            return(new TimerValue(
                       _meter.GetValue(resetMetric),
                       _histogram.GetValue(resetMetric),
                       activeSessions,
                       TimeUnit.Nanoseconds));
        }