Examples of evictionCount()


Examples of com.google.common.cache.CacheStats.evictionCount()

    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());
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

    LOG.info(nrpcs + " increments in " + timing + "ms = "
             + (nrpcs * 1000L / timing) + "/s");
    final CacheStats stats = client.stats().incrementBufferStats();
    LOG.info("Increments coalesced: " + stats.hitCount());
    LOG.info("Increments sent to HBase: " + stats.missCount());
    LOG.info("  due to cache evictions: " + stats.evictionCount());

    LOG.info("Reading all counters back from HBase and checking values...");
    final Scanner scanner = client.newScanner(table);
    scanner.setStartKey(key(0));
    scanner.setStopKey(key(NUM_ROWS));
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

                if (evictions >= nextLogThreshold) {
                    Logger logger = Logger.getLogger(ConfigAdapterImpl.class);
                    CacheStats stats = cache.stats();
                    logger.info(String.format(
                        "Cache %s evicted %d entries for size pressure, hit rate=%.3f, evictions=%d, loads=%d %s",
                        name, evictions, stats.hitRate(), stats.evictionCount(),
                        stats.loadCount(), stats.toString()));
                    // We want to log every 10 until 100, every 100 until 1000, every 1000 thereafter
                    if (nextLogThreshold == 1) {
                        nextLogThreshold = 10;
                    } else if (nextLogThreshold < 100) {
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

      stringBuilder.append(String.format("Total succesful loaded values: %d %n", cacheStats.loadSuccessCount()));
      stringBuilder.append(String.format("Total requests: %d %n", cacheStats.requestCount()));
      stringBuilder.append(String.format("Hits ratio: %d/%d - %.3f %n", cacheStats.hitCount(), cacheStats.missCount(), cacheStats.hitRate()));
      stringBuilder.append(String.format("Average time spent loading new values (nanoseconds): %.3f %n", cacheStats.averageLoadPenalty()));
      stringBuilder.append(String.format("Number of cache evictions: %d %n", cacheStats.evictionCount()));

      return stringBuilder.toString();
    }

    @Override
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

        @Override
        public void run() {
          CacheStats cacheStats = cacheResource.getCacheStats().minus(relativeCacheStats);

          String csvStats = String.format("%.3f, %.3f, %d %n", cacheStats.hitRate(), cacheStats.averageLoadPenalty(), cacheStats.evictionCount());
          try {
            com.google.common.io.Files.append(csvStats, cacheLog, Charset.defaultCharset());
          } catch (IOException e) {
          }
        }
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

            log.debug("Cache statistics :");
            log.debug("\t\t- hits count : {}", cacheStats.hitCount());
            log.debug("\t\t- hits rate : {}", cacheStats.hitRate());
            log.debug("\t\t- miss count : {}", cacheStats.missCount());
            log.debug("\t\t- miss rate : {}", cacheStats.missRate());
            log.debug("\t\t- eviction count : {}", cacheStats.evictionCount());
            log.debug("\t\t- load count : {}", cacheStats.loadCount());
            log.debug("\t\t- load success count : {}", cacheStats.loadSuccessCount());
            log.debug("\t\t- load exception count : {}", cacheStats.loadExceptionCount());
            log.debug("\t\t- total load time : {}", cacheStats.totalLoadTime());
            log.debug("\t\t- average load penalty : {}", cacheStats.averageLoadPenalty());
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

                .append("<li>hitCount: ").append(stats.hitCount()).append("</li>")
                .append("<li>missCount: ").append(stats.missCount()).append("</li>")
                .append("<li>loadSuccessCount: ").append(stats.loadSuccessCount()).append("</li>")
                .append("<li>loadExceptionCount: ").append(stats.loadExceptionCount()).append("</li>")
                .append("<li>totalLoadTime: ").append(stats.totalLoadTime()).append("</li>")
                .append("<li>evictionCount: ").append(stats.evictionCount()).append("</li>")
                .append("</ul>").toString();
       
    }

    private String getUserStats(CachedRuleReader cacheRuleReader) {
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

                .append("<li>hitCount: ").append(stats.hitCount()).append("</li>")
                .append("<li>missCount: ").append(stats.missCount()).append("</li>")
                .append("<li>loadSuccessCount: ").append(stats.loadSuccessCount()).append("</li>")
                .append("<li>loadExceptionCount: ").append(stats.loadExceptionCount()).append("</li>")
                .append("<li>totalLoadTime: ").append(stats.totalLoadTime()).append("</li>")
                .append("<li>evictionCount: ").append(stats.evictionCount()).append("</li>")
                .append("</ul>");
        return sb.toString();
    }

    /**
 
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

                .append(" hitCount:").append(stats.hitCount())
                .append(" missCount:").append(stats.missCount())
                .append(" loadSuccessCount:").append(stats.loadSuccessCount())
                .append(" loadExceptionCount:").append(stats.loadExceptionCount())
                .append(" totalLoadTime:").append(stats.totalLoadTime())
                .append(" evictionCount:").append(stats.evictionCount())
                .append("] \n");

        stats = crr.getUserStats();
        sb.append("UserStats[")
                .append(" size:").append(crr.getUserCacheSize())
View Full Code Here

Examples of com.google.common.cache.CacheStats.evictionCount()

                .append(" hitCount:").append(stats.hitCount())
                .append(" missCount:").append(stats.missCount())
                .append(" loadSuccessCount:").append(stats.loadSuccessCount())
                .append(" loadExceptionCount:").append(stats.loadExceptionCount())
                .append(" totalLoadTime:").append(stats.totalLoadTime())
                .append(" evictionCount:").append(stats.evictionCount())
                .append("] \n");

       getResponse().setEntity(new StringRepresentation(sb));
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.