コード例 #1
0
ファイル: SingleHealthMetrics.cs プロジェクト: RossMerr/Polly
 private void ActualiseCurrentMetric_NeedsLock()
 {
     long now = SystemClock.UtcNow().Ticks;
     if (_current == null || now - _current.StartedAt >= _samplingDuration)
     {
         _current = new HealthCount { StartedAt = now };
     }
 }
コード例 #2
0
        private void ActualiseCurrentMetric_NeedsLock()
        {
            long now = SystemClock.UtcNow().Ticks;

            if (_current == null || now - _current.StartedAt >= _samplingDuration)
            {
                _current = new HealthCount {
                    StartedAt = now
                };
            }
        }
コード例 #3
0
        private void ActualiseCurrentMetric_NeedsLock()
        {
            long now = SystemClock.UtcNow().Ticks;
            if (_currentWindow == null || now - _currentWindow.StartedAt >= _windowDuration)
            {
                _currentWindow = new HealthCount { StartedAt = now };
                _windows.Enqueue(_currentWindow);
            }

            while (_windows.Count > 0 && (now - _windows.Peek().StartedAt >= _samplingDuration))
                _windows.Dequeue();
        }
コード例 #4
0
        private void ActualiseCurrentMetric_NeedsLock()
        {
            long now = SystemClock.UtcNow().Ticks;

            if (_currentWindow == null || now - _currentWindow.StartedAt >= _windowDuration)
            {
                _currentWindow = new HealthCount {
                    StartedAt = now
                };
                _windows.Enqueue(_currentWindow);
            }

            while (_windows.Count > 0 && (now - _windows.Peek().StartedAt >= _samplingDuration))
            {
                _windows.Dequeue();
            }
        }
コード例 #5
0
 public void Reset_NeedsLock()
 {
     _currentWindow = null;
     _windows.Clear();
 }
コード例 #6
0
ファイル: SingleHealthMetrics.cs プロジェクト: RossMerr/Polly
 public void Reset_NeedsLock()
 {
     _current = null;
 }
コード例 #7
0
 public void Reset_NeedsLock()
 {
     _current = null;
 }
コード例 #8
0
 public void Reset_NeedsLock()
 {
     _currentWindow = null;
     _windows.Clear();
 }