diff --git a/test/c/testlib/testlib.c b/test/c/testlib/testlib.c index c037ab5b..dbcd345e 100644 --- a/test/c/testlib/testlib.c +++ b/test/c/testlib/testlib.c @@ -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)); } }