t/io_uring: show IOPS in increments of 1000 IOPS if necessary
authorJens Axboe <axboe@kernel.dk>
Tue, 12 Oct 2021 19:48:45 +0000 (13:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Oct 2021 19:48:45 +0000 (13:48 -0600)
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 <axboe@kernel.dk>
t/io_uring.c

index cdd15986360ba475db3ce4afec8315784052b3b6..444f84155c83b24e7722e3be48f6b030488f07d7 100644 (file)
@@ -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);