示例#1
0
        internal HdrHistogramReservoir(Recorder recorder)
        {
            this.recorder = recorder;

            this.intervalHistogram = recorder.GetIntervalHistogram();
            this.runningTotals     = new HdrHistogram.Histogram(this.intervalHistogram.NumberOfSignificantValueDigits);
        }
示例#2
0
 private HdrHistogram.Histogram UpdateTotals()
 {
     lock (this.runningTotals)
     {
         this.intervalHistogram = this.recorder.GetIntervalHistogram(this.intervalHistogram);
         this.runningTotals.add(this.intervalHistogram);
         return(this.runningTotals.copy() as HdrHistogram.Histogram);
     }
 }
示例#3
0
 /// <summary>
 /// Construct an auto-resizing Recorder with a lowest discernible value of
 /// 1 and an auto-adjusting highestTrackableValue. Can auto-resize up to track values up to (long.MaxValue / 2).
 /// </summary>
 /// <param name="numberOfSignificantValueDigits">Specifies the precision to use. This is the number of significant decimal digits to which the histogram will maintain value resolution and separation. Must be a non-negative integer between 0 and 5.</param>
 public Recorder(int numberOfSignificantValueDigits)
 {
     activeHistogram   = new InternalConcurrentHistogram(instanceId, numberOfSignificantValueDigits);
     inactiveHistogram = new InternalConcurrentHistogram(instanceId, numberOfSignificantValueDigits);
     activeHistogram.setStartTimeStamp(CurentTimeInMilis());
 }
示例#4
0
 private static HistogramBase DecodeHistogram(ByteBuffer buffer, long minBarForHighestTrackableValue)
 {
     return(Histogram.DecodeFromCompressedByteBuffer <LongHistogram>(buffer, minBarForHighestTrackableValue));
 }