public class MetricsCache extends Object implements PerfMetricsProvider
| Modifier and Type | Method and Description |
|---|---|
Perf |
addPerfIfAbsent(String perfName)
Add a new performance monitor if one has not existed, else return the
existing one.
|
void |
clearMetrics(String perfName)
Clear all metrics for the given
Perf's name. |
void |
clearPerfs()
Clear all performance measurements.
|
Collection<Perf> |
getAllPerfs()
Get all
Perf's. |
Perf |
getPerf(String perfName)
Retrieve the
Perf instance for the given name. |
static PerfMetricsProvider |
instance()
Return a singleton instance.
|
public static PerfMetricsProvider instance()
public Perf getPerf(String perfName)
PerfMetricsProviderPerf instance for the given name.getPerf in interface PerfMetricsProviderperfName - name of Perf structurepublic Perf addPerfIfAbsent(String perfName)
PerfMetricsProvideraddPerfIfAbsent in interface PerfMetricsProviderperfName - performance monitor namepublic Collection<Perf> getAllPerfs()
PerfMetricsProviderPerf's.getAllPerfs in interface PerfMetricsProviderpublic void clearMetrics(String perfName)
PerfMetricsProviderPerf's name.clearMetrics in interface PerfMetricsProviderperfName - name of Perfpublic void clearPerfs()
PerfMetricsProviderclearPerfs in interface PerfMetricsProviderCopyright © 2014. All Rights Reserved.