jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1497722 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java
Date Fri, 28 Jun 2013 10:49:26 GMT
Author: chetanm
Date: Fri Jun 28 10:49:26 2013
New Revision: 1497722

URL: http://svn.apache.org/r1497722
Log:
OAK-863 - Enable stats for various caches used in Oak by default

Prettyfying string output for cachestats

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java?rev=1497722&r1=1497721&r2=1497722&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java
Fri Jun 28 10:49:26 2013
@@ -134,15 +134,15 @@ public class CacheStats implements Cache
     public String cacheInfoAsString() {
         return Objects.toStringHelper("CacheStats")
                 .add("hitCount", getHitCount())
-                .add("hitRate", getHitRate())
+                .add("hitRate", String.format("%1.2f",getHitRate()))
                 .add("missCount", getMissCount())
-                .add("missRate", getMissRate())
+                .add("missRate", String.format("%1.2f",getMissRate()))
                 .add("requestCount", getRequestCount())
                 .add("loadCount", getLoadCount())
                 .add("loadSuccessCount", getLoadSuccessCount())
                 .add("loadExceptionCount", getLoadExceptionCount())
                 .add("totalLoadTime", getTotalLoadTime())
-                .add("averageLoadPenalty", getAverageLoadPenalty())
+                .add("averageLoadPenalty", String.format("%1.2f",getAverageLoadPenalty()))
                 .add("evictionCount", getEvictionCount())
                 .add("elementCount", getElementCount())
                 .add("totalWeight", humanReadableByteCount(estimateCurrentWeight(), true))



Mime
View raw message