summaryrefslogtreecommitdiffstats
path: root/source4/torture/nbench
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-03-10 05:05:56 +0000
committerAndrew Tridgell <tridge@samba.org>2004-03-10 05:05:56 +0000
commitc66a2c1438237002b079b9d6a7c9601f9371f51f (patch)
tree90f73f8fcf23d4392450562afc377388c575ce6d /source4/torture/nbench
parent5e31a56e725b41f9759535de0322459baa3ced5f (diff)
downloadsamba-c66a2c1438237002b079b9d6a7c9601f9371f51f.tar.gz
samba-c66a2c1438237002b079b9d6a7c9601f9371f51f.tar.xz
samba-c66a2c1438237002b079b9d6a7c9601f9371f51f.zip
make the warmup and execute phases clearer
(This used to be commit d49e4407e59a25c8e887b552ed2a58de7a16b6d9)
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r--source4/torture/nbench/nbio.c17
1 files 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);
}