From 55037c4839c65612fa388ae937e63661d8192ed9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 31 Jul 2022 12:06:12 -0600 Subject: [PATCH] t/io_uring: switch to GiB/sec if numbers get large Easier to read if we're above 2GiB/sec in bandwidth. Signed-off-by: Jens Axboe --- t/io_uring.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/t/io_uring.c b/t/io_uring.c index 10035912..335a06ed 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -1546,8 +1546,15 @@ int main(int argc, char *argv[]) else printf("IOPS=%lu, ", iops); max_iops = max(max_iops, iops); - if (!do_nop) - printf("BW=%luMiB/s, ", bw); + if (!do_nop) { + if (bw > 2000) { + double bw_g = (double) bw / 1000.0; + + printf("BW=%.2fGiB/s, ", bw_g); + } else { + printf("BW=%luMiB/s, ", bw); + } + } printf("IOS/call=%ld/%ld, inflight=(%s)\n", rpc, ipc, fdepths); done = this_done; calls = this_call; -- 2.25.1