Tweak "wuffs bench" output format

This commit is contained in:
Nigel Tao committed 2018-05-04 17:32:35 +10:00
1 parent ba98b04307
commit 5e9cca7e82
1 file changed
+10 -9
+10 -9
View File
@@ -246,7 +246,7 @@ int test_main(int argc, char** argv, proc* tests, proc* benches) {
} else { } else {
reps++; // +1 for the warm up run. reps++; // +1 for the warm up run.
procs = benches; procs = benches;
printf("# %s version %s\n#\n", cc, cc_version); printf("# %s\n# %s version %s\n#\n", proc_filename, cc, cc_version);
printf( printf(
"# The output format, including the \"Benchmark\" prefixes, is " "# The output format, including the \"Benchmark\" prefixes, is "
"compatible with the\n" "compatible with the\n"
@@ -274,14 +274,15 @@ int test_main(int argc, char** argv, proc* tests, proc* benches) {
tests_run++; tests_run++;
} }
} }
} if (i != 0) {
if (bench) { continue;
printf( }
"# %-16s%-8s(%d benchmarks run, 1+%d reps per benchmark, " if (bench) {
"iterscale=%d)\n", printf("# %d benchmarks, 1+%d reps per benchmark, iterscale=%d\n",
proc_filename, cc, tests_run, reps - 1, (int)(iterscale)); tests_run, reps - 1, (int)(iterscale));
} else { } else {
printf("%-16s%-8sPASS (%d tests run)\n", proc_filename, cc, tests_run); printf("%-16s%-8sPASS (%d tests)\n", proc_filename, cc, tests_run);
}
} }
return 0; return 0;
} }