summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-07-19 07:04:31 -0600
committerJens Axboe <axboe@kernel.dk>2022-07-19 07:29:03 -0600
commit89132cbbfce9249a47730c3667c1896b2465d038 (patch)
tree538246e30f5f4021b7aa76e3343c4872ea66d377
parentd6225c1550827077c0c0f9e1b8816b4f35cd5304 (diff)
downloadfio-test.tar.gz
fio-test.tar.bz2
t/io_uring: display IOPS in millions if it gets large enoughtest
If it's above 10000K IOPS, just display in millions with two decimals. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--t/io_uring.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/io_uring.c b/t/io_uring.c
index 10035912..795ddcb7 100644
--- a/t/io_uring.c
+++ b/t/io_uring.c
@@ -1031,7 +1031,9 @@ static void do_finish(const char *reason)
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 @@ int main(int argc, char *argv[])
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);