From dc10c23ab9a7b34f50a4957789ce1f2e0883366b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 12 Oct 2021 13:48:45 -0600 Subject: [PATCH] t/io_uring: show IOPS in increments of 1000 IOPS if necessary It's a bit hard to read the millions of IOPS, so if we're above 100K IOPS, scale by 1000 and add a K instead. This is easier to read: IOPS=7235K, BW=3532MiB/s, IOS/call=31/31, inflight=(78 114) IOPS=7218K, BW=3524MiB/s, IOS/call=32/32, inflight=(79 105) Signed-off-by: Jens Axboe --- t/io_uring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/io_uring.c b/t/io_uring.c index cdd15986..444f8415 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -1314,7 +1314,10 @@ int main(int argc, char *argv[]) bw = iops * (bs / 1048576); else bw = iops / (1048576 / bs); - printf("IOPS=%lu, ", iops); + if (iops > 100000) + printf("IOPS=%luK, ", iops / 1000); + else + printf("IOPS=%luK, ", iops / 1000); if (!do_nop) printf("BW=%luMiB/s, ", bw); printf("IOS/call=%ld/%ld, inflight=(%s)\n", rpc, ipc, fdepths); -- 2.25.1