mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Strip the "bench_" from "Benchmarkbench_etc".
This commit is contained in:
1 parent
8d5ef6365d
commit
ed6c642f98
1 file changed
+8
-3
@@ -52,12 +52,17 @@ void bench_finish(uint64_t reps, uint64_t n_bytes) {
|
||||
nanos = (uint64_t)(micros)*1000;
|
||||
}
|
||||
uint64_t kb_per_s = n_bytes * 1000000 / nanos;
|
||||
|
||||
const char* name = proc_funcname;
|
||||
if (!strncmp(name, "bench_", 6)) {
|
||||
name += 6;
|
||||
}
|
||||
if (bench_warm_up) {
|
||||
printf("# (warm up) %s/%s\t%8" PRIu64 ".%06" PRIu64 " seconds\n",
|
||||
proc_funcname, cc, nanos / 1000000000, (nanos % 1000000000) / 1000);
|
||||
printf("# (warm up) %s/%s\t%8" PRIu64 ".%06" PRIu64 " seconds\n", name, cc,
|
||||
nanos / 1000000000, (nanos % 1000000000) / 1000);
|
||||
} else {
|
||||
printf("Benchmark%s/%s\t%8" PRIu64 "\t%8" PRIu64 " ns/op\t%8d.%03d MB/s\n",
|
||||
proc_funcname, cc, reps, nanos / reps, (int)(kb_per_s / 1000),
|
||||
name, cc, reps, nanos / reps, (int)(kb_per_s / 1000),
|
||||
(int)(kb_per_s % 1000));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user