From a1f171000c21e97ad4e44dcd7c810834507b184f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 4 Oct 2021 16:16:01 -0600 Subject: [PATCH] t/io_uring: don't print partial IOPS etc output if exit signal was received The run always terminates with what looks like a much slower cycle than the previous seconds. That's not really the case, it's just that the sleep() got interrupted by the signal and we slept less than we thought we did, yet we still account it as a full second. Just make it cleaner and break if finish is set. Signed-off-by: Jens Axboe --- t/io_uring.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/io_uring.c b/t/io_uring.c index c0e571bd..5132927e 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -1277,6 +1277,10 @@ int main(int argc, char *argv[]) unsigned long iops, bw; sleep(1); + + /* don't print partial run, if interrupted by signal */ + if (finish) + break; for (j = 0; j < nthreads; j++) { this_done += s->done; this_call += s->calls; -- 2.25.1