* NAME: block->showstats() * DESCRIPTION: output cache hit/miss ratio */
| 93 | * DESCRIPTION: output cache hit/miss ratio |
| 94 | */ |
| 95 | void b_showstats(const bcache *cache) |
| 96 | { |
| 97 | fprintf(stderr, "BLOCK: CACHE vol 0x%lx \"%s\" hit/miss ratio = %.3f\n", |
| 98 | (unsigned long) cache->vol, cache->vol->mdb.drVN, |
| 99 | (float) cache->hits / (float) cache->misses); |
| 100 | } |
| 101 | |
| 102 | /* |
| 103 | * NAME: block->dumpcache() |