private void logStats() { if (!LOG.isDebugEnabled()) return; long created = chunkCount.get(); long reused = reusedChunkCount.sum(); long total = created + reused; LOG.debug("{} stats (chunk size={}): current pool size={}, created chunk count={}, " + "reused chunk count={}, reuseRatio={}", label, chunkSize, reclaimedChunks.size(), created, reused, (total == 0? "0": StringUtils.formatPercent((float)reused/(float)total,2))); } }
public void logStats() { // Log size long totalSize = heapSize(); long freeSize = maxSize - totalSize; LruBlockCache.LOG.info("totalSize=" + StringUtils.byteDesc(totalSize) + ", " + "freeSize=" + StringUtils.byteDesc(freeSize) + ", " + "max=" + StringUtils.byteDesc(this.maxSize) + ", " + "blockCount=" + getBlockCount() + ", " + "accesses=" + stats.getRequestCount() + ", " + "hits=" + stats.getHitCount() + ", " + "hitRatio=" + (stats.getHitCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitRatio(), 2)+ ", ")) + ", " + "cachingAccesses=" + stats.getRequestCachingCount() + ", " + "cachingHits=" + stats.getHitCachingCount() + ", " + "cachingHitsRatio=" + (stats.getHitCachingCount() == 0 ? "0,": (StringUtils.formatPercent(stats.getHitCachingRatio(), 2) + ", ")) + "evictions=" + stats.getEvictionCount() + ", " + "evicted=" + stats.getEvictedCount() + ", " + "evictedPerRun=" + stats.evictedPerEviction()); }
public void logStats() { long totalSize = bucketAllocator.getTotalSize(); long usedSize = bucketAllocator.getUsedSize(); long freeSize = totalSize - usedSize; long cacheSize = getRealCacheSize(); LOG.info("failedBlockAdditions=" + cacheStats.getFailedInserts() + ", " + "totalSize=" + StringUtils.byteDesc(totalSize) + ", " + "freeSize=" + StringUtils.byteDesc(freeSize) + ", " + "usedSize=" + StringUtils.byteDesc(usedSize) +", " + "cacheSize=" + StringUtils.byteDesc(cacheSize) +", " + "accesses=" + cacheStats.getRequestCount() + ", " + "hits=" + cacheStats.getHitCount() + ", " + "IOhitsPerSecond=" + cacheStats.getIOHitsPerSecond() + ", " + "IOTimePerHit=" + String.format("%.2f", cacheStats.getIOTimePerHit())+ ", " + "hitRatio=" + (cacheStats.getHitCount() == 0 ? "0," : (StringUtils.formatPercent(cacheStats.getHitRatio(), 2)+ ", ")) + "cachingAccesses=" + cacheStats.getRequestCachingCount() + ", " + "cachingHits=" + cacheStats.getHitCachingCount() + ", " + "cachingHitsRatio=" +(cacheStats.getHitCachingCount() == 0 ? "0," : (StringUtils.formatPercent(cacheStats.getHitCachingRatio(), 2)+ ", ")) + "evictions=" + cacheStats.getEvictionCount() + ", " + "evicted=" + cacheStats.getEvictedCount() + ", " + "evictedPerRun=" + cacheStats.evictedPerEviction()); cacheStats.reset(); }
/** * Add a new row to the usages table for the given FileSystem URI. * * @param uri - FileSystem URI * @param fsStatus - FileSystem status * @param mountedOnPath - FileSystem mounted on path */ private void addToUsagesTable(URI uri, FsStatus fsStatus, String mountedOnPath) { long size = fsStatus.getCapacity(); long used = fsStatus.getUsed(); long free = fsStatus.getRemaining(); getUsagesTable().addRow( uri, formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double) used / (double) size, 0), mountedOnPath ); }
+ StringUtils.formatPercent(dfsUsedPercent, 2));
static String percent(float f) { return StringUtils.formatPercent(f, 1); }
static String percent(float f) { return StringUtils.formatPercent(f, 1); }
static String appendPercent(String message, float f) { return message + " (" + StringUtils.formatPercent(f, 1) + ")"; }
static String percent(float f) { return StringUtils.formatPercent(f, 1); }
@Override public String toRateString(Number value, long duration) { Number rate = rateRatioNumber(value, duration); return rate == null ? NOT_AVAILABLE : (StringUtils.formatPercent(rate.doubleValue(), 2) + "/s"); }
@Override public String toString(Number value) { return value == null ? NOT_AVAILABLE : StringUtils.formatPercent(value.doubleValue(), 2); }
private String getRegionInfo(byte[] regionName) { return "Table: " + regionTableMap.get(regionName) + ", RS: " + regionRSMap.get(regionName) + ", Locality: " + (regionLocalityMap.get(regionName) == null ? "null" : StringUtils.formatPercent(regionLocalityMap.get(regionName), 2)) + ", SizeMB: " + regionSizeMap.get(regionName); }
private void logStats() { if (!LOG.isDebugEnabled()) return; long created = createdChunkCount.get(); long reused = reusedChunkCount.get(); long total = created + reused; LOG.debug("Stats: current pool size=" + reclaimedChunks.size() + ",created chunk count=" + created + ",reused chunk count=" + reused + ",reuseRatio=" + (total == 0 ? "0" : StringUtils.formatPercent( (float) reused / (float) total, 2))); }
public void run() { try { while (!ContentPump.shutdown && !interrupted() && !job.done()) { Thread.sleep(1000); if (ContentPump.shutdown) { break; } String report = (" completed " + StringUtils.formatPercent(computeProgress(), 0)); if (!report.equals(lastReport)) { LOG.info(report); lastReport = report; } } } catch (InterruptedException e) { } catch (Throwable t) { LOG.error("Error in monitor thread", t); } String report = (" completed " + StringUtils.formatPercent(computeProgress(), 0)); if (!report.equals(lastReport)) { LOG.info(report); } } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
@Override protected void processPath(PathData item) throws IOException { FsStatus fsStats = item.fs.getStatus(item.path); long size = fsStats.getCapacity(); long used = fsStats.getUsed(); long free = fsStats.getRemaining(); usagesTable.addRow( item.fs.getUri(), formatSize(size), formatSize(used), formatSize(free), StringUtils.formatPercent((double)used/(double)size, 0) ); } }
public void logStats() { if (!LOG.isDebugEnabled()) return; // Log size long totalSize = heapSize(); long freeSize = maxSize - totalSize; LruBlockCache.LOG.debug("Stats: " + "total=" + StringUtils.byteDesc(totalSize) + ", " + "free=" + StringUtils.byteDesc(freeSize) + ", " + "max=" + StringUtils.byteDesc(this.maxSize) + ", " + "blocks=" + size() +", " + "accesses=" + stats.getRequestCount() + ", " + "hits=" + stats.getHitCount() + ", " + "hitRatio=" + (stats.getHitCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitRatio(), 2)+ ", ")) + ", " + "cachingAccesses=" + stats.getRequestCachingCount() + ", " + "cachingHits=" + stats.getHitCachingCount() + ", " + "cachingHitsRatio=" + (stats.getHitCachingCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitCachingRatio(), 2)+ ", ")) + ", " + "evictions=" + stats.getEvictionCount() + ", " + "evicted=" + stats.getEvictedCount() + ", " + "evictedPerRun=" + stats.evictedPerEviction()); }
public void logStats() { // Log size long totalSize = heapSize(); long freeSize = maxSize - totalSize; LruBlockCache.LOG.info("totalSize=" + StringUtils.byteDesc(totalSize) + ", " + "freeSize=" + StringUtils.byteDesc(freeSize) + ", " + "max=" + StringUtils.byteDesc(this.maxSize) + ", " + "blockCount=" + getBlockCount() + ", " + "accesses=" + stats.getRequestCount() + ", " + "hits=" + stats.getHitCount() + ", " + "hitRatio=" + (stats.getHitCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitRatio(), 2)+ ", ")) + ", " + "cachingAccesses=" + stats.getRequestCachingCount() + ", " + "cachingHits=" + stats.getHitCachingCount() + ", " + "cachingHitsRatio=" + (stats.getHitCachingCount() == 0 ? "0,": (StringUtils.formatPercent(stats.getHitCachingRatio(), 2) + ", ")) + "evictions=" + stats.getEvictionCount() + ", " + "evicted=" + stats.getEvictedCount() + ", " + "evictedPerRun=" + stats.evictedPerEviction()); }