Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
HistogramIterationValue.java Written by Gil Tene of Azul Systems, and released to the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/

Author(s):
Gil Tene
  
  
  package org.HdrHistogram;

Represents a value point iterated through in a Histogram, with associated stats.

  • valueIteratedTo :
    The actual value level that was iterated to by the iterator

  • prevValueIteratedTo :
    The actual value level that was iterated from by the iterator

  • countAtValueIteratedTo :
    The count of recorded values in the histogram that exactly match this [lowestEquivalentValue(valueIteratedTo)...highestEquivalentValue(valueIteratedTo)] value range.

  • countAddedInThisIterationStep :
    The count of recorded values in the histogram that were added to the totalCountToThisValue (below) as a result on this iteration step. Since multiple iteration steps may occur with overlapping equivalent value ranges, the count may be lower than the count found at the value (e.g. multiple linear steps or percentile levels can occur within a single equivalent value range)

  • totalCountToThisValue :
    The total count of all recorded values in the histogram at values equal or smaller than valueIteratedTo.

  • totalValueToThisValue :
    The sum of all recorded values in the histogram at values equal or smaller than valueIteratedTo.

  • percentile :
    The percentile of recorded values in the histogram at values equal or smaller than valueIteratedTo.

  • percentileLevelIteratedTo :
    The percentile level that the iterator returning this HistogramIterationValue had iterated to. Generally, percentileLevelIteratedTo will be equal to or smaller than percentile, but the same value point can contain multiple iteration levels for some iterators. E.g. a PercentileIterator can stop multiple times in the exact same value point (if the count at that value covers a range of multiple percentiles in the requested percentile iteration points).
 
 
 public class HistogramIterationValue {
     long valueIteratedTo;
     long valueIteratedFrom;
     long countAtValueIteratedTo;
     long totalCountToThisValue;
     long totalValueToThisValue;
     double percentile;
     double percentileLevelIteratedTo;
 
     // Set is all-or-nothing to avoid the potential for accidental omission of some values...
     void set(final long valueIteratedTofinal long valueIteratedFromfinal long countAtValueIteratedTo,
              final long countInThisIterationStepfinal long totalCountToThisValuefinal long totalValueToThisValue,
              final double percentilefinal double percentileLevelIteratedTo) {
         this. = valueIteratedTo;
         this. = valueIteratedFrom;
         this. = countAtValueIteratedTo;
         this. = countInThisIterationStep;
         this. = totalCountToThisValue;
         this. = totalValueToThisValue;
         this. = percentile;
         this. = percentileLevelIteratedTo;
     }
 
     void reset() {
         this. = 0;
         this. = 0;
         this. = 0;
         this. = 0;
         this. = 0;
         this. = 0;
         this. = 0.0;
         this. = 0.0;
     }
 
     }
 
     public String toString() {
         return  "valueIteratedTo:" +  +
                 ", prevValueIteratedTo:" +  +
                 ", countAtValueIteratedTo:" +  +
                 ", countAddedInThisIterationStep:" +  +
                 ", totalCountToThisValue:" +  +
                 ", totalValueToThisValue:" +  +
                 ", percentile:" +  +
                 ", percentileLevelIteratedTo:" + ;
     }
 
     public long getValueIteratedTo() {
         return ;
     }
 
     public long getValueIteratedFrom() {
         return ;
    }
    public long getCountAtValueIteratedTo() {
        return ;
    }
    public long getCountAddedInThisIterationStep() {
        return ;
    }
    public long getTotalCountToThisValue() {
        return ;
    }
    public long getTotalValueToThisValue() {
        return ;
    }
    public double getPercentile() {
        return ;
    }
    public double getPercentileLevelIteratedTo() {
        return ;
    }
New to GrepCode? Check out our FAQ X