public class MetricUtils extends Object
| Constructor and Description |
|---|
MetricUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addMetrics(NamedList<Object> lst,
com.codahale.metrics.Timer timer)
Adds metrics from a Timer to a NamedList, using well-known back-compat names.
|
static ExecutorService |
instrumentedExecutorService(ExecutorService delegate,
com.codahale.metrics.MetricRegistry metricRegistry,
String scope)
Returns an instrumented wrapper over the given executor service.
|
static NamedList |
toNamedList(com.codahale.metrics.MetricRegistry registry,
List<com.codahale.metrics.MetricFilter> shouldMatchFilters,
com.codahale.metrics.MetricFilter mustMatchFilter)
Returns a NamedList representation of the given metric registry.
|
public static void addMetrics(NamedList<Object> lst, com.codahale.metrics.Timer timer)
lst - The NamedList to add the metrics data totimer - The Timer to extract the metrics frompublic static NamedList toNamedList(com.codahale.metrics.MetricRegistry registry, List<com.codahale.metrics.MetricFilter> shouldMatchFilters, com.codahale.metrics.MetricFilter mustMatchFilter)
registry - the MetricRegistry to be converted to NamedListshouldMatchFilters - a list of MetricFilter instances.
A metric must match any one of the filters from this list to be
included in the outputmustMatchFilter - a MetricFilter.
A metric must match this filter to be included in the output.NamedListpublic static ExecutorService instrumentedExecutorService(ExecutorService delegate, com.codahale.metrics.MetricRegistry metricRegistry, String scope)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.