Changes to output formattng of mixedbench.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 7 Feb 2011 15:22:44 +0000 (07:22 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 7 Feb 2011 15:22:44 +0000 (07:22 -0800)
microbench/mixedbench.c

index fcb9f63..ae26e71 100644 (file)
@@ -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;
 }