public class RuntimeStats extends Object
| Constructor and Description |
|---|
RuntimeStats() |
RuntimeStats(Map<String,RuntimeMetric> metrics) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetricValue(String name,
long value) |
void |
addMetricValueIgnoreZero(String name,
long value) |
static RuntimeStats |
copyOf(RuntimeStats stats) |
RuntimeMetric |
getMetric(String name) |
Map<String,RuntimeMetric> |
getMetrics() |
static RuntimeStats |
merge(RuntimeStats stats1,
RuntimeStats stats2)
Merges
stats1 and stats2 and returns the result. |
void |
mergeMetric(String name,
RuntimeMetric metric)
Merges
metric into this object with name name. |
void |
mergeWith(RuntimeStats stats)
Merges
stats into this object. |
<V> V |
profileNanos(String tag,
Supplier<V> supplier) |
void |
reset() |
void |
update(RuntimeStats stats)
Updates the metrics according to their values in
stats. |
public RuntimeStats()
public RuntimeStats(Map<String,RuntimeMetric> metrics)
public static RuntimeStats copyOf(RuntimeStats stats)
public static RuntimeStats merge(RuntimeStats stats1, RuntimeStats stats2)
stats1 and stats2 and returns the result. The input parameters are not updated.public void reset()
public RuntimeMetric getMetric(String name)
public Map<String,RuntimeMetric> getMetrics()
public void addMetricValue(String name, long value)
public void addMetricValueIgnoreZero(String name, long value)
public void mergeMetric(String name, RuntimeMetric metric)
metric into this object with name name.public void mergeWith(RuntimeStats stats)
stats into this object.public void update(RuntimeStats stats)
stats.
Metrics not included in stats will not be changed.Copyright © 2012–2022. All rights reserved.