From 1ed13176b8bacd57fa728ae3f6395ca78e8c2d20 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 7 Feb 2011 07:22:44 -0800 Subject: [PATCH] Changes to output formattng of mixedbench. --- microbench/mixedbench.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/microbench/mixedbench.c b/microbench/mixedbench.c index fcb9f63..ae26e71 100644 --- a/microbench/mixedbench.c +++ b/microbench/mixedbench.c @@ -194,10 +194,11 @@ void reset_stats(int print) } if (print) { - printf("Reads: %d operations, %f average latency\n", + printf("read: [%d, %f]\n", read_count, read_time / 1e9 / read_count); - printf("Writes: %d operations, %f average latency\n", + printf("write: [%d, %f]\n", write_count, write_time / 1e9 / write_count); + printf("\n"); } } @@ -223,13 +224,10 @@ int main(int argc, char *argv[]) launch_thread(i); } - /* Warm up phase: run for half the time but do not keep statistics */ - sleep_micros(opt_duration * 1000000 / 2); - reset_stats(1); - - /* Benchmark phase: run for half the time and print summary */ - sleep_micros(opt_duration * 1000000 / 2); - reset_stats(1); + for (int i = 0; i < 4; i++) { + sleep_micros(opt_duration * 1000000 / 4); + reset_stats(1); + } return 0; } -- 2.20.1