use of com.google.common.cache.CacheStats in project platformlayer by platformlayer.
the class CacheMetricsReporter method addMetrics.
@Override
public void addMetrics(MetricTreeObject tree) {
long size = cache.size();
CacheStats stats = cache.stats();
MetricTreeObject subtree = tree.getSubtree(key);
subtree.addInt("size", size);
subtree.addInt("evictionCount", stats.evictionCount());
subtree.addInt("hitCount", stats.hitCount());
subtree.addInt("loadCount", stats.loadCount());
subtree.addInt("loadExceptionCount", stats.loadExceptionCount());
subtree.addInt("loadSuccessCount", stats.loadSuccessCount());
subtree.addInt("missCount", stats.missCount());
subtree.addInt("requestCount", stats.requestCount());
subtree.addInt("totalLoadTime", stats.totalLoadTime());
subtree.addFloat("averageLoadPenalty", stats.averageLoadPenalty());
subtree.addFloat("hitRate", stats.hitRate());
subtree.addFloat("loadExceptionRate", stats.loadExceptionRate());
subtree.addFloat("missRate", stats.missRate());
}
Aggregations