public class AggregateMetricReader extends Object implements MetricReader
*.*.counter.** and
*.*.[anything].**, and the result has metric names in the form
aggregate.count.** and aggregate.[anything].**. Counters are summed and
anything else (i.e. gauges) are aggregated by choosing the most recent value.| Constructor and Description |
|---|
AggregateMetricReader(MetricReader source) |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
The number of metrics known to this reader.
|
Iterable<Metric<?>> |
findAll()
Find all the metrics known to this reader.
|
Metric<?> |
findOne(String metricName)
Find an instance of the metric with the given name (usually the latest recorded
value).
|
void |
setKeyPattern(String keyPattern)
Pattern that tells the aggregator what to do with the keys from the source
repository.
|
void |
setPrefix(String prefix)
Prefix to apply to all output metrics.
|
public AggregateMetricReader(MetricReader source)
public void setKeyPattern(String keyPattern)
keyPattern - the keyPattern to setpublic void setPrefix(String prefix)
prefix - the prefix to use (default "aggregator.")public Metric<?> findOne(String metricName)
MetricReaderfindOne in interface MetricReadermetricName - the name of the metric to findpublic Iterable<Metric<?>> findAll()
MetricReaderfindAll in interface MetricReaderpublic long count()
MetricReadercount in interface MetricReaderCopyright © 2016 Pivotal Software, Inc.. All rights reserved.