|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.Metrics
public class Metrics
A set of factory methods for creating centrally registered metric instances.
| Method Summary | ||
|---|---|---|
static MetricsRegistry |
defaultRegistry()
Returns the (static) default registry. |
|
static Counter |
newCounter(Class<?> klass,
String name)
Creates a new Counter and registers it under the given class
and name. |
|
static Counter |
newCounter(Class<?> klass,
String name,
String scope)
Creates a new Counter and registers it under the given class
and name. |
|
static Counter |
newCounter(MetricName metricName)
Creates a new Counter and registers it under the given metric
name. |
|
static
|
newGauge(Class<?> klass,
String name,
Gauge<T> metric)
Given a new Gauge, registers it under the given class and
name. |
|
static
|
newGauge(Class<?> klass,
String name,
String scope,
Gauge<T> metric)
Given a new Gauge, registers it under the given class and
name. |
|
static
|
newGauge(MetricName metricName,
Gauge<T> metric)
Given a new Gauge, registers it under the given metric name. |
|
static Histogram |
newHistogram(Class<?> klass,
String name)
Creates a new non-biased Histogram and registers it under the
given class and name. |
|
static Histogram |
newHistogram(Class<?> klass,
String name,
boolean biased)
Creates a new Histogram and registers it under the given
class and name. |
|
static Histogram |
newHistogram(Class<?> klass,
String name,
String scope)
Creates a new non-biased Histogram and registers it under the
given class, name, and scope. |
|
static Histogram |
newHistogram(Class<?> klass,
String name,
String scope,
boolean biased)
Creates a new Histogram and registers it under the given
class, name, and scope. |
|
static Histogram |
newHistogram(MetricName metricName)
Creates a new non-biased Histogram and registers it under the
given metric name. |
|
static Histogram |
newHistogram(MetricName metricName,
boolean biased)
Creates a new Histogram and registers it under the given
metric name. |
|
static Meter |
newMeter(Class<?> klass,
String name,
String scope,
String eventType,
TimeUnit unit)
Creates a new Meter and registers it under the given class,
name, and scope. |
|
static Meter |
newMeter(Class<?> klass,
String name,
String eventType,
TimeUnit unit)
Creates a new Meter and registers it under the given class
and name. |
|
static Meter |
newMeter(MetricName metricName,
String eventType,
TimeUnit unit)
Creates a new Meter and registers it under the given metric
name. |
|
static Timer |
newTimer(Class<?> klass,
String name)
Creates a new Timer and registers it under the given class
and name, measuring elapsed time in milliseconds and invocations per second. |
|
static Timer |
newTimer(Class<?> klass,
String name,
String scope)
Creates a new Timer and registers it under the given class,
name, and scope, measuring elapsed time in milliseconds and invocations per second. |
|
static Timer |
newTimer(Class<?> klass,
String name,
String scope,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates a new Timer and registers it under the given class,
name, and scope. |
|
static Timer |
newTimer(Class<?> klass,
String name,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates a new Timer and registers it under the given class
and name. |
|
static Timer |
newTimer(MetricName metricName,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates a new Timer and registers it under the given metric
name. |
|
static void |
shutdown()
Shuts down all thread pools for the default registry. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> Gauge<T> newGauge(Class<?> klass,
String name,
Gauge<T> metric)
Gauge, registers it under the given class and
name.
T - the type of the value returned by the metricklass - the class which owns the metricname - the name of the metricmetric - the metric
metric
public static <T> Gauge<T> newGauge(Class<?> klass,
String name,
String scope,
Gauge<T> metric)
Gauge, registers it under the given class and
name.
T - the type of the value returned by the metricklass - the class which owns the metricname - the name of the metricscope - the scope of the metricmetric - the metric
metric
public static <T> Gauge<T> newGauge(MetricName metricName,
Gauge<T> metric)
Gauge, registers it under the given metric name.
T - the type of the value returned by the metricmetricName - the name of the metricmetric - the metric
metric
public static Counter newCounter(Class<?> klass,
String name)
Counter and registers it under the given class
and name.
klass - the class which owns the metricname - the name of the metric
Counter
public static Counter newCounter(Class<?> klass,
String name,
String scope)
Counter and registers it under the given class
and name.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metric
Counterpublic static Counter newCounter(MetricName metricName)
Counter and registers it under the given metric
name.
metricName - the name of the metric
Counter
public static Histogram newHistogram(Class<?> klass,
String name,
boolean biased)
Histogram and registers it under the given
class and name.
klass - the class which owns the metricname - the name of the metricbiased - whether or not the histogram should be biased
Histogram
public static Histogram newHistogram(Class<?> klass,
String name,
String scope,
boolean biased)
Histogram and registers it under the given
class, name, and scope.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metricbiased - whether or not the histogram should be biased
Histogram
public static Histogram newHistogram(MetricName metricName,
boolean biased)
Histogram and registers it under the given
metric name.
metricName - the name of the metricbiased - whether or not the histogram should be biased
Histogram
public static Histogram newHistogram(Class<?> klass,
String name)
Histogram and registers it under the
given class and name.
klass - the class which owns the metricname - the name of the metric
Histogram
public static Histogram newHistogram(Class<?> klass,
String name,
String scope)
Histogram and registers it under the
given class, name, and scope.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metric
Histogrampublic static Histogram newHistogram(MetricName metricName)
Histogram and registers it under the
given metric name.
metricName - the name of the metric
Histogram
public static Meter newMeter(Class<?> klass,
String name,
String eventType,
TimeUnit unit)
Meter and registers it under the given class
and name.
klass - the class which owns the metricname - the name of the metriceventType - the plural name of the type of events the meter is measuring (e.g., "requests")unit - the rate unit of the new meter
Meter
public static Meter newMeter(Class<?> klass,
String name,
String scope,
String eventType,
TimeUnit unit)
Meter and registers it under the given class,
name, and scope.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metriceventType - the plural name of the type of events the meter is measuring (e.g., "requests")unit - the rate unit of the new meter
Meter
public static Meter newMeter(MetricName metricName,
String eventType,
TimeUnit unit)
Meter and registers it under the given metric
name.
metricName - the name of the metriceventType - the plural name of the type of events the meter is measuring (e.g., "requests")unit - the rate unit of the new meter
Meter
public static Timer newTimer(Class<?> klass,
String name,
TimeUnit durationUnit,
TimeUnit rateUnit)
Timer and registers it under the given class
and name.
klass - the class which owns the metricname - the name of the metricdurationUnit - the duration scale unit of the new timerrateUnit - the rate scale unit of the new timer
Timer
public static Timer newTimer(Class<?> klass,
String name)
Timer and registers it under the given class
and name, measuring elapsed time in milliseconds and invocations per second.
klass - the class which owns the metricname - the name of the metric
Timer
public static Timer newTimer(Class<?> klass,
String name,
String scope,
TimeUnit durationUnit,
TimeUnit rateUnit)
Timer and registers it under the given class,
name, and scope.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metricdurationUnit - the duration scale unit of the new timerrateUnit - the rate scale unit of the new timer
Timer
public static Timer newTimer(Class<?> klass,
String name,
String scope)
Timer and registers it under the given class,
name, and scope, measuring elapsed time in milliseconds and invocations per second.
klass - the class which owns the metricname - the name of the metricscope - the scope of the metric
Timer
public static Timer newTimer(MetricName metricName,
TimeUnit durationUnit,
TimeUnit rateUnit)
Timer and registers it under the given metric
name.
metricName - the name of the metricdurationUnit - the duration scale unit of the new timerrateUnit - the rate scale unit of the new timer
Timerpublic static MetricsRegistry defaultRegistry()
public static void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||