From 191561c108198d35c47a4848f0553f2a81b09efc Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 10 Jan 2019 21:38:35 -0700 Subject: [PATCH] t/io_uring: make submits/reaps per-second reflected with sq thread poll If we use polling, the numbers currently read as 0. Make them -1 to reflect that we're actually doing zero calls per IO. Signed-off-by: Jens Axboe --- t/io_uring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/io_uring.c b/t/io_uring.c index 58a1c458..976d4046 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -514,8 +514,9 @@ int main(int argc, char *argv[]) if (this_call - calls) { rpc = (this_done - done) / (this_call - calls); ipc = (this_reap - reap) / (this_call - calls); - } - printf("IOPS=%lu, IOS/call=%lu/%lu, inflight=%u (head=%u tail=%u), Cachehit=%0.2f%%\n", + } else + rpc = ipc = -1; + printf("IOPS=%lu, IOS/call=%ld/%ld, inflight=%u (head=%u tail=%u), Cachehit=%0.2f%%\n", this_done - done, rpc, ipc, s->inflight, *s->cq_ring.head, *s->cq_ring.tail, hit); done = this_done; -- 2.25.1