public LatencyStepQueueEventProcessor(FunctionStep functionStep, BlockingCollection<long> inputQueue, BlockingCollection<long> outputQueue, Histogram histogram, long nanoTimeCost, double ticksToNanos, long iterations) { _functionStep = functionStep; _inputQueue = inputQueue; _outputQueue = outputQueue; _histogram = histogram; _nanoTimeCost = nanoTimeCost; _ticksToNanos = ticksToNanos; _iterations = iterations; }
/// <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); }
protected LatencyPerfTest(int iterations, Histogram histogram) : base(iterations) { Histogram = histogram; StopwatchTimestampCostInNano = InitStopwatchTimestampCostInNano(); }