From 9ca144fec3077984e37397d0c1d1f6d098841e2e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 27 Sep 2014 14:12:02 -0600 Subject: [PATCH] t/dedupe: print dedupe ratio instead of made-up factor Signed-off-by: Jens Axboe --- t/dedupe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/dedupe.c b/t/dedupe.c index fc280772..12ede8f0 100644 --- a/t/dedupe.c +++ b/t/dedupe.c @@ -475,10 +475,11 @@ static void show_chunk(struct chunk *c) static void show_stat(uint64_t nextents, uint64_t nchunks) { - double perc; + double perc, ratio; printf("Extents=%lu, Unique extents=%lu\n", (unsigned long) nextents, (unsigned long) nchunks); - printf("De-dupe factor: %3.2f\n", (double) nextents / (double) nchunks); + ratio = (double) nextents / (double) nchunks; + printf("De-dupe ratio: 1:%3.2f\n", ratio - 1.0); perc = 1.00 - ((double) nchunks / (double) nextents); perc *= 100.0; -- 2.25.1