From: Jens Axboe Date: Tue, 7 Oct 2014 03:00:10 +0000 (-0600) Subject: t/dedupe: fix off-by 1.024 in bandwidth X-Git-Tag: fio-2.1.14~97 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=45b56027da94b1513e991a67999d7bab51b77149 t/dedupe: fix off-by 1.024 in bandwidth Signed-off-by: Jens Axboe --- diff --git a/t/dedupe.c b/t/dedupe.c index 69ebc8a9..b3ab0f9b 100644 --- a/t/dedupe.c +++ b/t/dedupe.c @@ -361,7 +361,7 @@ static void show_progress(struct worker_thread *threads, unsigned long total) this_items *= blocksize; tdiff = mtime_since_now(&last_tv); if (tdiff) { - this_items /= tdiff; + this_items = (this_items * 1000) / (tdiff * 1024); printf("%3.2f%% done (%luKB/sec)\r", perc, this_items); last_nitems = nitems; fio_gettime(&last_tv, NULL);