From c66a2c1438237002b079b9d6a7c9601f9371f51f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Mar 2004 05:05:56 +0000 Subject: make the warmup and execute phases clearer (This used to be commit d49e4407e59a25c8e887b552ed2a58de7a16b6d9) --- source4/torture/nbench/nbio.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index fee3af05e4..8a9c36f1d0 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -73,16 +73,25 @@ void nb_alarm(void) t = end_timer(); - printf("%4d %8d %.2f MB/sec time %.0f sec \r", - num_clients, lines/nprocs, - 1.0e-6 * nbio_total() / t, - t - warmup); + if (warmup) { + printf("%4d %8d %.2f MB/sec warmup %.0f sec \r", + num_clients, lines/nprocs, + 1.0e-6 * nbio_total() / t, + t); + } else { + printf("%4d %8d %.2f MB/sec execute %.0f sec \r", + num_clients, lines/nprocs, + 1.0e-6 * nbio_total() / t, + t); + } if (warmup && t >= warmup) { start_timer(); warmup = 0; } + fflush(stdout); + signal(SIGALRM, nb_alarm); alarm(1); } -- cgit