com.yammer.metrics.core
Enum HistogramMetric.SampleType

java.lang.Object
  extended by java.lang.Enum<HistogramMetric.SampleType>
      extended by com.yammer.metrics.core.HistogramMetric.SampleType
All Implemented Interfaces:
Serializable, Comparable<HistogramMetric.SampleType>
Enclosing class:
HistogramMetric

public static enum HistogramMetric.SampleType
extends Enum<HistogramMetric.SampleType>

The type of sampling the histogram should be performing.


Enum Constant Summary
BIASED
          Uses an exponentially decaying sample of 1028 elements, which offers a 99.9% confidence level with a 5% margin of error assuming a normal distribution, and an alpha factor of 0.015, which heavily biases the sample to the past 5 minutes of measurements.
UNIFORM
          Uses a uniform sample of 1028 elements, which offers a 99.9% confidence level with a 5% margin of error assuming a normal distribution.
 
Method Summary
abstract  Sample newSample()
           
static HistogramMetric.SampleType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HistogramMetric.SampleType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNIFORM

public static final HistogramMetric.SampleType UNIFORM
Uses a uniform sample of 1028 elements, which offers a 99.9% confidence level with a 5% margin of error assuming a normal distribution.


BIASED

public static final HistogramMetric.SampleType BIASED
Uses an exponentially decaying sample of 1028 elements, which offers a 99.9% confidence level with a 5% margin of error assuming a normal distribution, and an alpha factor of 0.015, which heavily biases the sample to the past 5 minutes of measurements.

Method Detail

values

public static HistogramMetric.SampleType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HistogramMetric.SampleType c : HistogramMetric.SampleType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HistogramMetric.SampleType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

newSample

public abstract Sample newSample()


Copyright © 2011. All Rights Reserved.