From: Michael Vrable Date: Mon, 7 Feb 2011 15:22:44 +0000 (-0800) Subject: Changes to output formattng of mixedbench. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=1ed13176b8bacd57fa728ae3f6395ca78e8c2d20;p=bluesky.git Changes to output formattng of mixedbench. --- 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; }