public class ActivityMetrics extends Object
| Modifier and Type | Field and Description |
|---|---|
static com.codahale.metrics.MetricFilter |
METRIC_FILTER |
| Modifier and Type | Method and Description |
|---|---|
static void |
addHistoLogger(String sessionName,
String pattern,
String filename,
String interval)
Add a histogram interval logger to matching metrics in this JVM instance.
|
static void |
addStatsLogger(String sessionName,
String pattern,
String filename,
String interval)
Add a histogram stats logger to matching metrics in this JVM instance.
|
static com.codahale.metrics.Counter |
counter(ActivityDef activityDef,
String name)
Create a counter associated with an activity.
|
static com.codahale.metrics.Gauge<?> |
gauge(ActivityDef activityDef,
String name,
com.codahale.metrics.Gauge<?> gauge) |
static com.codahale.metrics.Gauge<?> |
gauge(ScriptContext scriptContext,
String name,
com.codahale.metrics.Gauge<?> gauge) |
static com.codahale.metrics.MetricRegistry |
getMetricRegistry() |
static com.codahale.metrics.Histogram |
histogram(ActivityDef activityDef,
String name)
Create a histogram associated with an activity.
|
static com.codahale.metrics.Meter |
meter(ActivityDef activityDef,
String name)
Create a meter associated with an activity.
|
static void |
reportTo(PrintStream out) |
static com.codahale.metrics.Timer |
timer(ActivityDef activityDef,
String name)
Create a timer associated with an activity.
|
public static com.codahale.metrics.Timer timer(ActivityDef activityDef, String name)
Create a timer associated with an activity.
This method ensures that if multiple threads attempt to create the same-named metric on a given activity, that only one of them succeeds.
activityDef - an associated activity defname - a simple, descriptive name for the timerpublic static com.codahale.metrics.Histogram histogram(ActivityDef activityDef, String name)
Create a histogram associated with an activity.
This method ensures that if multiple threads attempt to create the same-named metric on a given activity, that only one of them succeeds.
activityDef - an associated activity defname - a simple, descriptive name for the histogrampublic static com.codahale.metrics.Counter counter(ActivityDef activityDef, String name)
Create a counter associated with an activity.
This method ensures that if multiple threads attempt to create the same-named metric on a given activity, that only one of them succeeds.
activityDef - an associated activity defname - a simple, descriptive name for the counterpublic static com.codahale.metrics.Meter meter(ActivityDef activityDef, String name)
Create a meter associated with an activity.
This method ensures that if multiple threads attempt to create the same-named metric on a given activity, that only one of them succeeds.
activityDef - an associated activity defname - a simple, descriptive name for the meterpublic static com.codahale.metrics.Gauge<?> gauge(ActivityDef activityDef, String name, com.codahale.metrics.Gauge<?> gauge)
public static com.codahale.metrics.Gauge<?> gauge(ScriptContext scriptContext, String name, com.codahale.metrics.Gauge<?> gauge)
public static com.codahale.metrics.MetricRegistry getMetricRegistry()
public static void addHistoLogger(String sessionName, String pattern, String filename, String interval)
sessionName - The name for the session to be annotated in the histogram logpattern - A regular expression pattern to filter out metric names for loggingfilename - A file to log the histogram data ininterval - How many seconds to wait between writing each interval histogrampublic static void addStatsLogger(String sessionName, String pattern, String filename, String interval)
sessionName - The name for the session to be annotated in the histogram logpattern - A regular expression pattern to filter out metric names for loggingfilename - A file to log the histogram data ininterval - How many seconds to wait between writing each interval histogrampublic static void reportTo(PrintStream out)
Copyright © 2017. All rights reserved.