dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit b8b0b8ba4b138cb9bbf631e21435ee7c9034e25b
parent 4b9498e7eb0396140d4e814f01e1bebb18c9aa77
Author: sin <sin@2f30.org>
Date:   Mon,  1 Apr 2019 15:29:52 +0100

Print cache hit percentage

Diffstat:
Mdedup.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -68,9 +68,9 @@ print_stats(struct stats *st) (unsigned long long)st->max_blk_size); fprintf(stderr, "Number of unique blocks: %llu\n", (unsigned long long)st->nr_blks); - icache_stats(icache, &hits, &misses); - fprintf(stderr, "Index cache hits: %llu\n", hits); - fprintf(stderr, "Index cache hits: %llu\n", misses); + icache_stats(icache, &hits, &misses); + fprintf(stderr, "Index cache hit percentage: %.2f%%\n", + (double)100 * (hits / (hits + misses))); } static struct snap *