001// Autogenerated Jamon implementation 002// /Users/peter.somogyi/Cloudera/repos/hbase-upstream/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon 003 004package org.apache.hadoop.hbase.tmpl.regionserver; 005 006// 37, 1 007import java.util.Map; 008// 38, 1 009import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile; 010// 39, 1 011import org.apache.hadoop.hbase.io.hfile.AgeSnapshot; 012// 40, 1 013import org.apache.hadoop.hbase.io.hfile.CachedBlock; 014// 41, 1 015import org.apache.hadoop.conf.Configuration; 016// 42, 1 017import org.apache.hadoop.hbase.io.hfile.CacheConfig; 018// 43, 1 019import org.apache.hadoop.hbase.io.hfile.BlockCache; 020// 44, 1 021import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats; 022// 45, 1 023import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache; 024// 46, 1 025import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator; 026// 47, 1 027import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket; 028// 48, 1 029import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix; 030 031public class BlockCacheTmplImpl 032 extends org.jamon.AbstractTemplateImpl 033 implements org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl.Intf 034 035{ 036 private final CacheConfig cacheConfig; 037 private final Configuration config; 038 protected static org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl.ImplData __jamon_setOptionalArguments(org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl.ImplData p_implData) 039 { 040 return p_implData; 041 } 042 public BlockCacheTmplImpl(org.jamon.TemplateManager p_templateManager, org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl.ImplData p_implData) 043 { 044 super(p_templateManager, __jamon_setOptionalArguments(p_implData)); 045 cacheConfig = p_implData.getCacheConfig(); 046 config = p_implData.getConfig(); 047 } 048 049 @Override public void renderNoFlush(final java.io.Writer jamonWriter) 050 throws java.io.IOException 051 { 052 // 24, 1 053 054 BlockCache bc = cacheConfig == null? null: cacheConfig.getBlockCache(); 055 String bcUrl = null; 056 String bcName = null; 057 if (bc != null) { 058 bcUrl = "http://hbase.apache.org/devapidocs/" + bc.getClass().getName().replaceAll("\\.", "/") + ".html"; 059 bcName = bc.getClass().getSimpleName(); 060 } 061 BlockCache [] bcs = cacheConfig == null? null: cacheConfig.getBlockCache() == null? null: cacheConfig.getBlockCache().getBlockCaches(); 062 // If more than one bc, show evictions in each bc listing so can compare 063 boolean evictions = bcs != null && bcs.length > 1; 064 065 // 50, 1 066 jamonWriter.write("<div class=\"tabbable\">\n <ul class=\"nav nav-pills\">\n <li class=\"active\"><a href=\"#tab_bc_baseInfo\" data-toggle=\"tab\">Base Info</a></li>\n <li class=\"\"><a href=\"#tab_bc_config\" data-toggle=\"tab\">Config</a></li>\n <li class=\"\"><a href=\"#tab_bc_stats\" data-toggle=\"tab\">Stats</a></li>\n <li class=\"\"><a href=\"#tab_bc_l1\" data-toggle=\"tab\">L1</a></li>\n <li class=\"\"><a href=\"#tab_bc_l2\" data-toggle=\"tab\">L2</a></li>\n </ul>\n <div class=\"tab-content\" style=\"padding-bottom: 9px; border-bottom: 1px solid #ddd;\">\n <div class=\"tab-pane active\" id=\"tab_bc_baseInfo\">\n "); 067 // 60, 13 068 { 069 // 60, 13 070 __jamon_innerUnit__bc_baseInfo(jamonWriter, cacheConfig, bcUrl, bcName); 071 } 072 // 60, 91 073 jamonWriter.write("\n </div>\n <div class=\"tab-pane\" id=\"tab_bc_config\">\n "); 074 // 63, 13 075 { 076 // 63, 13 077 __jamon_innerUnit__bc_config(jamonWriter, cacheConfig ); 078 } 079 // 63, 55 080 jamonWriter.write("\n </div>\n <div class=\"tab-pane\" id=\"tab_bc_stats\">\n "); 081 // 66, 13 082 { 083 // 66, 13 084 __jamon_innerUnit__bc_stats(jamonWriter, cacheConfig ); 085 } 086 // 66, 54 087 jamonWriter.write("\n </div>\n <div class=\"tab-pane\" id=\"tab_bc_l1\">\n "); 088 // 69, 13 089 { 090 // 69, 13 091 __jamon_innerUnit__bc_l(jamonWriter, bcs == null? bc: bcs[0], "L1", evictions); 092 } 093 // 69, 90 094 jamonWriter.write("\n </div>\n <div class=\"tab-pane\" id=\"tab_bc_l2\">\n "); 095 // 72, 13 096 { 097 // 72, 13 098 __jamon_innerUnit__bc_l(jamonWriter, bcs == null? null: bcs.length <= 1? null: bcs[1], "L2", evictions); 099 } 100 // 72, 115 101 jamonWriter.write("\n </div>\n </div>\n</div>\n\n"); 102 } 103 104 105 // 77, 1 106 private void __jamon_innerUnit__bc_baseInfo(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final String bcUrl, final String bcName) 107 throws java.io.IOException 108 { 109 // 83, 1 110 111 BlockCache bc = cacheConfig == null? null: cacheConfig.getBlockCache(); 112 BlockCache [] bcs = bc == null? null: bc.getBlockCaches(); 113 String bcl1Url = null; 114 String bcl1Name = null; 115 String bcl2Url = null; 116 String bcl2Name = null; 117 if (bcs != null) { 118 BlockCache bcl1 = bcs[0]; 119 if (bcl1 != null) { 120 bcl1Url = "http://hbase.apache.org/devapidocs/" + bcl1.getClass().getName().replaceAll("\\.", "/") + ".html"; 121 bcl1Name = bcl1.getClass().getSimpleName(); 122 } 123 if (bcs.length == 2) { 124 BlockCache bcl2 = bcs[1]; 125 bcl2Url = "http://hbase.apache.org/devapidocs/" + bcl2.getClass().getName().replaceAll("\\.", "/") + ".html"; 126 bcl2Name = bcl2.getClass().getSimpleName(); 127 } 128 } 129 130 // 103, 1 131 jamonWriter.write("<table class=\"table table-striped\">\n <tr>\n <th>Attribute</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n </tr>\n <tr>\n <td>Implementation</td>\n <td><a href=\""); 132 // 112, 22 133 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bcUrl), jamonWriter); 134 // 112, 33 135 jamonWriter.write("\">"); 136 // 112, 35 137 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bcName), jamonWriter); 138 // 112, 47 139 jamonWriter.write("</a></td>\n <td>Block cache implementing class</td>\n </tr>\n</table>\n<p>See <a href=\"http://hbase.apache.org/book.html#block.cache\">block cache</a> in the HBase Reference Guide for help.</p>\n"); 140 } 141 142 143 // 119, 1 144 private void __jamon_innerUnit__bc_config(final java.io.Writer jamonWriter, final CacheConfig cacheConfig) 145 throws java.io.IOException 146 { 147 // 123, 1 148 if (cacheConfig == null ) 149 { 150 // 123, 28 151 jamonWriter.write("\n<p>CacheConfig is null</p>\n"); 152 } 153 // 125, 1 154 else 155 { 156 // 125, 8 157 jamonWriter.write("\n<table class=\"table table-striped\">\n <tr>\n <th>Attribute</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n <tr>\n <td>Cache DATA on Read</td>\n <td>"); 158 // 134, 13 159 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldCacheDataOnRead()), jamonWriter); 160 // 134, 54 161 jamonWriter.write("</td>\n <td>True if DATA blocks are cached on read\n (INDEX & BLOOM blocks are always cached)</td>\n </tr>\n <tr>\n <td>Cache DATA on Write</td>\n <td>"); 162 // 140, 13 163 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldCacheDataOnWrite()), jamonWriter); 164 // 140, 55 165 jamonWriter.write("</td>\n <td>True if DATA blocks are cached on write.</td>\n </tr>\n <tr>\n <td>Cache INDEX on Write</td>\n <td>"); 166 // 145, 13 167 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldCacheIndexesOnWrite()), jamonWriter); 168 // 145, 58 169 jamonWriter.write("</td>\n <td>True if INDEX blocks are cached on write</td>\n </tr>\n <tr>\n <td>Cache BLOOM on Write</td>\n <td>"); 170 // 150, 13 171 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldCacheBloomsOnWrite()), jamonWriter); 172 // 150, 57 173 jamonWriter.write("</td>\n <td>True if BLOOM blocks are cached on write</td>\n </tr>\n <tr>\n <td>Evict blocks on Close</td>\n <td>"); 174 // 155, 13 175 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldEvictOnClose()), jamonWriter); 176 // 155, 51 177 jamonWriter.write("</td>\n <td>True if blocks are evicted from cache when an HFile\n reader is closed</td>\n </tr>\n <tr>\n <td>Cache DATA in compressed format</td>\n <td>"); 178 // 161, 13 179 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldCacheDataCompressed()), jamonWriter); 180 // 161, 58 181 jamonWriter.write("</td>\n <td>True if DATA blocks are cached in their compressed form</td>\n </tr>\n <tr>\n <td>Prefetch on Open</td>\n <td>"); 182 // 166, 13 183 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cacheConfig.shouldPrefetchOnOpen()), jamonWriter); 184 // 166, 53 185 jamonWriter.write("</td>\n <td>True if blocks are prefetched into cache on open</td>\n </tr>\n</table>\n"); 186 } 187 // 170, 7 188 jamonWriter.write("\n"); 189 } 190 191 192 // 268, 1 193 private void __jamon_innerUnit__bc_l(final java.io.Writer jamonWriter, final BlockCache bc, final String name, final boolean evictions) 194 throws java.io.IOException 195 { 196 // 274, 1 197 if (bc == null ) 198 { 199 // 274, 19 200 jamonWriter.write("\n<p>No "); 201 // 275, 7 202 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(name), jamonWriter); 203 // 275, 17 204 jamonWriter.write(" deployed</p>\n"); 205 } 206 // 276, 1 207 else 208 { 209 // 276, 8 210 jamonWriter.write("\n"); 211 // 277, 1 212 { 213 // 277, 1 214 __jamon_innerUnit__block_cache(jamonWriter, bc, name, evictions); 215 } 216 // 277, 65 217 jamonWriter.write("\n"); 218 } 219 // 278, 7 220 jamonWriter.write("\n"); 221 } 222 223 224 // 230, 1 225 private void __jamon_innerUnit__bc_stats(final java.io.Writer jamonWriter, final CacheConfig cacheConfig) 226 throws java.io.IOException 227 { 228 // 234, 1 229 if (cacheConfig == null || cacheConfig.getBlockCache() == null ) 230 { 231 // 234, 67 232 jamonWriter.write("\n<p>CacheConfig is null</p>\n"); 233 } 234 // 236, 1 235 else 236 { 237 // 236, 8 238 jamonWriter.write("\n<table class=\"table table-striped\">\n <tr>\n <th>Attribute</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n <tr>\n <td>Size</td>\n <td>"); 239 // 245, 13 240 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(cacheConfig.getBlockCache().getCurrentSize(), 241 "B", 1)), jamonWriter); 242 // 246, 23 243 jamonWriter.write("</td>\n <td>Current size of block cache in use</td>\n </tr>\n <tr>\n <td>Free</td>\n <td>"); 244 // 251, 13 245 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(cacheConfig.getBlockCache().getFreeSize(), 246 "B", 1)), jamonWriter); 247 // 252, 23 248 jamonWriter.write("</td>\n <td>The total free memory currently available to store more cache entries</td>\n </tr>\n <tr>\n <td>Count</td>\n <td>"); 249 // 257, 13 250 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", cacheConfig.getBlockCache().getBlockCount())), jamonWriter); 251 // 257, 84 252 jamonWriter.write("</td>\n <td>Number of blocks in block cache</td>\n </tr>\n "); 253 // 260, 5 254 { 255 // 260, 5 256 __jamon_innerUnit__evictions_tmpl(jamonWriter, cacheConfig.getBlockCache()); 257 } 258 // 260, 60 259 jamonWriter.write("\n "); 260 // 261, 5 261 { 262 // 261, 5 263 __jamon_innerUnit__hits_tmpl(jamonWriter, cacheConfig.getBlockCache()); 264 } 265 // 261, 55 266 jamonWriter.write("\n</table>\n<p>If block cache is made up of more than one cache -- i.e. a L1 and a L2 -- then the above\nare combined counts. Request count is sum of hits and misses.</p>\n"); 267 } 268 // 265, 7 269 jamonWriter.write("\n"); 270 } 271 272 273 // 281, 1 274 private void __jamon_innerUnit__block_cache(final java.io.Writer jamonWriter, final BlockCache bc, final String name, final boolean evictions) 275 throws java.io.IOException 276 { 277 // 287, 1 278 279 String bcUrl = "http://hbase.apache.org/devapidocs/" + bc.getClass().getName().replaceAll("\\.", "/") + ".html"; 280 String bcName = bc.getClass().getSimpleName(); 281 org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile cbsbf = 282 org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.getLoadedCachedBlocksByFile(config, bc); 283 AgeSnapshot cbsbfSnapshot = cbsbf.getAgeInCacheSnapshot(); 284 285 boolean bucketCache = bc.getClass().getSimpleName().equals("BucketCache"); 286 BucketCacheStats bucketCacheStats = null; 287 BucketAllocator bucketAllocator = null; 288 289 if (bucketCache) { 290 bucketCacheStats = (BucketCacheStats)bc.getStats(); 291 bucketAllocator = ((BucketCache)bc).getAllocator(); 292 } 293 294 // 303, 1 295 if (cbsbf.isFull() ) 296 { 297 // 303, 23 298 jamonWriter.write("\n<p>\n<div class=\"alert alert-danger\">\n<strong>The stats below are incomplete!</strong> We ran into our accounting limit of "); 299 // 306, 86 300 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(cbsbf.getCount()), jamonWriter); 301 // 306, 108 302 jamonWriter.write(" blocks. Up the configuration <i>hbase.ui.blockcache.by.file.max</i>.\n</div>\n</p> \n"); 303 } 304 // 309, 7 305 jamonWriter.write("\n<table id=\"blocks_summary\" class=\"table table-striped\">\n <tr>\n <th>Attribute</th>\n <th>Value</th>\n <th>Description</th>\n </tr>\n <tr>\n <td>Implementation</td>\n <td><a href=\""); 306 // 318, 22 307 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bcUrl), jamonWriter); 308 // 318, 33 309 jamonWriter.write("\">"); 310 // 318, 35 311 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bc.getClass().getSimpleName()), jamonWriter); 312 // 318, 70 313 jamonWriter.write("</a></td>\n <td>Class implementing this block cache Level</td>\n </tr>\n"); 314 // 321, 1 315 if (bucketCache ) 316 { 317 // 321, 20 318 jamonWriter.write("\n <tr>\n <td>Implementation</td>\n <td>"); 319 // 324, 13 320 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(((BucketCache)bc).getIoEngine()), jamonWriter); 321 // 324, 50 322 jamonWriter.write("</a></td>\n <td>IOEngine</td>\n </tr>\n"); 323 } 324 // 327, 7 325 jamonWriter.write("\n <tr>\n <td>Cache Size Limit</td>\n <td>"); 326 // 330, 13 327 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(bc.getMaxSize(), "B", 1)), jamonWriter); 328 // 330, 79 329 jamonWriter.write("</td>\n <td>Max size of cache</td>\n </tr>\n <tr>\n <td>Block Count</td>\n <td>"); 330 // 335, 13 331 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getBlockCount())), jamonWriter); 332 // 335, 59 333 jamonWriter.write("</td>\n <td>Count of Blocks</td>\n </tr>\n"); 334 // 338, 1 335 if (!bucketCache ) 336 { 337 // 338, 21 338 jamonWriter.write("\n <tr>\n <td>Data Block Count</td>\n <td>"); 339 // 341, 13 340 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getDataBlockCount())), jamonWriter); 341 // 341, 63 342 jamonWriter.write("</td>\n <td>Count of DATA Blocks</td>\n </tr>\n"); 343 } 344 // 344, 7 345 jamonWriter.write("\n <tr>\n <td>Size of Blocks</td>\n <td>"); 346 // 347, 13 347 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(bc.getCurrentSize(), "B", 1)), jamonWriter); 348 // 347, 83 349 jamonWriter.write("</td>\n <td>Size of Blocks</td>\n </tr>\n"); 350 // 350, 1 351 if (!bucketCache ) 352 { 353 // 350, 21 354 jamonWriter.write("\n <tr>\n <td>Size of Data Blocks</td>\n <td>"); 355 // 353, 13 356 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(TraditionalBinaryPrefix.long2String(bc.getCurrentDataSize(), "B", 1)), jamonWriter); 357 // 353, 87 358 jamonWriter.write("</td>\n <td>Size of DATA Blocks</td>\n </tr>\n"); 359 } 360 // 356, 7 361 jamonWriter.write(" \n"); 362 // 357, 1 363 { 364 // 357, 1 365 __jamon_innerUnit__evictions_tmpl(jamonWriter, bc); 366 } 367 // 357, 31 368 jamonWriter.write("\n"); 369 // 358, 1 370 { 371 // 358, 1 372 __jamon_innerUnit__hits_tmpl(jamonWriter, bc); 373 } 374 // 358, 26 375 jamonWriter.write("\n\n"); 376 // 360, 1 377 if (bucketCache ) 378 { 379 // 360, 20 380 jamonWriter.write("\n <tr>\n <td>Hits per Second</td>\n <td>"); 381 // 363, 13 382 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bucketCacheStats.getIOHitsPerSecond()), jamonWriter); 383 // 363, 56 384 jamonWriter.write("</td>\n <td>Block gets against this cache per second</td>\n </tr>\n <tr>\n <td>Time per Hit</td>\n <td>"); 385 // 368, 13 386 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(bucketCacheStats.getIOTimePerHit()), jamonWriter); 387 // 368, 53 388 jamonWriter.write("</td>\n <td>Time per cache hit</td>\n </tr>\n"); 389 } 390 // 371, 7 391 jamonWriter.write("\n</table>\n<p>View block cache <a href=\"?format=json&bcn="); 392 // 374, 47 393 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(name), jamonWriter); 394 // 374, 57 395 jamonWriter.write("\">as JSON</a> | Block cache <a href=\"?format=json&bcn="); 396 // 374, 111 397 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(name), jamonWriter); 398 // 374, 121 399 jamonWriter.write("&bcv=file\">as JSON by file</a></p>\n"); 400 // 375, 1 401 402cbsbf = null; 403 404 } 405 406 407 // 173, 1 408 private void __jamon_innerUnit__evictions_tmpl(final java.io.Writer jamonWriter, final BlockCache bc) 409 throws java.io.IOException 410 { 411 // 177, 1 412 413 AgeSnapshot ageAtEvictionSnapshot = bc.getStats().getAgeAtEvictionSnapshot(); 414 // Only show if non-zero mean and stddev as is the case in combinedblockcache 415 416 // 181, 5 417 jamonWriter.write("<tr>\n <td>Evicted</td>\n <td>"); 418 // 183, 13 419 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getEvictedCount())), jamonWriter); 420 // 183, 72 421 jamonWriter.write("</td>\n <td>The total number of blocks evicted</td>\n </tr>\n <tr>\n <td>Evictions</td>\n <td>"); 422 // 188, 13 423 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getEvictionCount())), jamonWriter); 424 // 188, 73 425 jamonWriter.write("</td>\n <td>The total number of times an eviction has occurred</td>\n </tr>\n <tr>\n <td>Mean</td>\n <td>"); 426 // 193, 13 427 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", (long)ageAtEvictionSnapshot.getMean())), jamonWriter); 428 // 193, 78 429 jamonWriter.write("</td>\n <td>Mean age of Blocks at eviction time (seconds)</td>\n </tr>\n"); 430 } 431 432 433 // 198, 1 434 private void __jamon_innerUnit__hits_tmpl(final java.io.Writer jamonWriter, final BlockCache bc) 435 throws java.io.IOException 436 { 437 // 202, 5 438 jamonWriter.write("<tr>\n <td>Hits</td>\n <td>"); 439 // 204, 13 440 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getHitCount())), jamonWriter); 441 // 204, 68 442 jamonWriter.write("</td>\n <td>Number requests that were cache hits</td>\n </tr>\n <tr>\n <td>Hits Caching</td>\n <td>"); 443 // 209, 13 444 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getHitCachingCount())), jamonWriter); 445 // 209, 75 446 jamonWriter.write("</td>\n <td>Cache hit block requests but only requests set to cache block if a miss</td>\n </tr>\n <tr>\n <td>Misses</td>\n <td>"); 447 // 214, 13 448 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getMissCount())), jamonWriter); 449 // 214, 69 450 jamonWriter.write("</td>\n <td>Block requests that were cache misses but set to cache missed blocks</td>\n </tr>\n <tr>\n <td>Misses Caching</td>\n <td>"); 451 // 219, 13 452 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,d", bc.getStats().getMissCount())), jamonWriter); 453 // 219, 69 454 jamonWriter.write("</td>\n <td>Block requests that were cache misses but only requests set to use block cache</td>\n </tr>\n <tr>\n <td>Hit Ratio</td>\n <td>"); 455 // 224, 13 456 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(String.format("%,.2f", bc.getStats().getHitRatio() * 100)), jamonWriter); 457 // 224, 76 458 org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf("%"), jamonWriter); 459 // 224, 85 460 jamonWriter.write("</td>\n <td>Hit Count divided by total requests count</td>\n </tr>\n\n"); 461 } 462 463 464}