public PriceLatencyRecorder()
        {
            //   _currentProcess = Process.GetCurrentProcess();
             //   _lastProcessTime = _currentProcess.UserProcessorTime;

            _uiLatency = GetHistogram();
            _serverLatency = GetHistogram();
            _combinedLatency = GetHistogram();
        }
 public PriceLatencyRecorder()
 {
     _uiLatency = GetHistogram();
     _serverLatency = GetHistogram();
     _combinedLatency = GetHistogram();
 }
Beispiel #3
0
        /// <summary>
        /// Add observations from another Histogram into this one.
        /// Histograms must have the same intervals.
        /// </summary>
        /// <param name="histogram">histogram from which to add the observation counts.</param>
        public void AddObservations(Histogram histogram)
        {
            if (_upperBounds.Length != histogram._upperBounds.Length)
            {
                throw new ArgumentException("Histograms must have matching intervals", "histogram");
            }

            for (int i = 0; i < _upperBounds.Length; i++)
            {
                if (_upperBounds[i] != histogram._upperBounds[i])
                {
                    throw new ArgumentException("Histograms must have matching intervals", "histogram");
                }
            }

            for (int i = 0; i < _counts.Length; i++)
            {
                _counts[i] += histogram._counts[i];
            }

            TrackRange(histogram._minValue);
            TrackRange(histogram._maxValue);
        }