Package org.opensolaris.os.dtrace
Class LogLinearDistribution
- java.lang.Object
-
- org.opensolaris.os.dtrace.Distribution
-
- org.opensolaris.os.dtrace.LogLinearDistribution
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LogLinearDistribution>
,java.lang.Iterable<Distribution.Bucket>
,AggregationValue
public final class LogLinearDistribution extends Distribution implements java.io.Serializable, java.lang.Comparable<LogLinearDistribution>
A log/linear distribution aggregated by the DTracellquantize()
action. Aggregated values are aggregated logarithmicly by order of magnitude (between the low and high magnitude arguments of thellquantize()
action, but linearly within each order of magnitude bounded by the step parameter of thellquantize()
action.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensolaris.os.dtrace.Distribution
Distribution.Bucket
-
-
Constructor Summary
Constructors Constructor Description LogLinearDistribution(long scaleFactor, long lowMagnitude, long highMagnitude, long bucketSteps, long baseVal, java.util.List<Distribution.Bucket> frequencies)
Creates a log/linear distribution with the given parameters, base values and frequencies.LogLinearDistribution(long enc, long base, java.util.List<Distribution.Bucket> frequencies)
Creates a log/linear distribution with the given parameters, base value and frequencies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LogLinearDistribution d)
Compares thedouble
values ofgetValue()
for overall magnitude, and if those are equal, compares frequencies at zero if the distrubions includea bucket whose range has a minimum of zero.long
getBase()
long
getEncValue()
java.lang.Number
getValue()
Gets the numeric value of this distribution used to compare distributions by overall magnitude, defined as the sum total of each bucket's frequency times the minimum of its range.-
Methods inherited from class org.opensolaris.os.dtrace.Distribution
asList, equals, get, getBuckets, getDisplayRange, getTotal, hashCode, iterator, size, toString
-
-
-
-
Constructor Detail
-
LogLinearDistribution
public LogLinearDistribution(long enc, long base, java.util.List<Distribution.Bucket> frequencies)
Creates a log/linear distribution with the given parameters, base value and frequencies. Used by XML Persistence.- Parameters:
enc
- The encoded representation of the high, low, step and stepsllquantize()
paramaters.base
- The base value of the distirbutionfrequencies
- list of frequencies in each bucket range
-
LogLinearDistribution
public LogLinearDistribution(long scaleFactor, long lowMagnitude, long highMagnitude, long bucketSteps, long baseVal, java.util.List<Distribution.Bucket> frequencies)
Creates a log/linear distribution with the given parameters, base values and frequencies.- Parameters:
scaleFactor
- factorlowMagnitude
- the low magnitudehighMagnitude
- the high magnitudebucketSteps
- number of linear steps per magnitudebaseVal
- basue valuefrequencies
- list of frequencies in each bucket range
-
-
Method Detail
-
getValue
public java.lang.Number getValue()
Description copied from class:Distribution
Gets the numeric value of this distribution used to compare distributions by overall magnitude, defined as the sum total of each bucket's frequency times the minimum of its range.- Specified by:
getValue
in interfaceAggregationValue
- Specified by:
getValue
in classDistribution
- Returns:
- non-null numeric value
-
compareTo
public int compareTo(LogLinearDistribution d)
Compares thedouble
values ofgetValue()
for overall magnitude, and if those are equal, compares frequencies at zero if the distrubions includea bucket whose range has a minimum of zero.- Specified by:
compareTo
in interfacejava.lang.Comparable<LogLinearDistribution>
-
getBase
public long getBase()
-
getEncValue
public long getEncValue()
-
-