tFix percentage calculation - dedup - deduplicating backup program
 (HTM) git clone git://git.z3bra.org/dedup.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 71a2045de89e6fbe69797470ee4f0110608b0765
 (DIR) parent b8b0b8ba4b138cb9bbf631e21435ee7c9034e25b
 (HTM) Author: sin <sin@2f30.org>
       Date:   Mon,  1 Apr 2019 15:45:13 +0100
       
       Fix percentage calculation
       
       Diffstat:
         M dedup.c                             |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/dedup.c b/dedup.c
       t@@ -50,6 +50,7 @@ static void
        print_stats(struct stats *st)
        {
                unsigned long long hits, misses;
       +        double hitratio;
        
                if (st->nr_blks == 0)
                        return;
       t@@ -69,8 +70,9 @@ print_stats(struct stats *st)
                fprintf(stderr, "Number of unique blocks: %llu\n",
                        (unsigned long long)st->nr_blks);
                icache_stats(icache, &hits, &misses);
       +        hitratio = (double)hits / (hits + misses);
                fprintf(stderr, "Index cache hit percentage: %.2f%%\n",
       -                (double)100 * (hits / (hits + misses)));
       +                100 * hitratio);
        }
        
        static struct snap *