t/io_uring: display IOPS in millions if it gets large enough If it's above 10000K IOPS, just display in millions with two decimals. Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/t/io_uring.c b/t/io_uring.c index 1003591..795ddcb 100644 --- a/t/io_uring.c +++ b/t/io_uring.c
@@ -1031,7 +1031,9 @@ struct submitter *s = get_submitter(j); s->finish = 1; } - if (max_iops > 100000) + if (max_iops > 1000000) + printf("Maximum IOPS=%.2fM\n", (double) max_iops / 1000000.0); + else if (max_iops > 100000) printf("Maximum IOPS=%luK\n", max_iops / 1000); else if (max_iops) printf("Maximum IOPS=%lu\n", max_iops); @@ -1541,7 +1543,9 @@ bw = iops * (bs / 1048576); else bw = iops / (1048576 / bs); - if (iops > 100000) + if (iops > 10000000) + printf("IOPS=%.2fM, ", (double) iops / 1000000.0); + else if (iops > 100000) printf("IOPS=%luK, ", iops / 1000); else printf("IOPS=%lu, ", iops);