From: Hitoshi Mitake Date: Tue, 10 Nov 2009 15:04:00 +0000 (+0900) Subject: perf bench: Improve builtin-bench.c for more friendly output X-Git-Tag: firefly_0821_release~9833^2~3628^2~288^2~17^3~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=79e295d4bd0f524257299e7c4e42f643f21abcc2;p=firefly-linux-kernel-4.4.55.git perf bench: Improve builtin-bench.c for more friendly output This patch makes output of perf bench more friendly. Current style of putput, keeping user wait and printing everything suddenly when we finish, may confuse users. So I improved it: | % perf bench sched messaging | # Running sched/messaging benchmark... <- printed right after invocation | # 20 sender and receiver processes per group | # 10 groups == 400 processes run | | Total time: 1.476 [sec] Signed-off-by: Hitoshi Mitake Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1257865442-20252-2-git-send-email-mitake@dcl.info.waseda.ac.jp> Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index c7505eaff84b..90c39baae0de 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c @@ -156,6 +156,10 @@ int cmd_bench(int argc, const char **argv, const char *prefix __used) if (strcmp(subsystems[i].suites[j].name, argv[1])) continue; + if (bench_format == BENCH_FORMAT_DEFAULT) + printf("# Running %s/%s benchmark...\n", + subsystems[i].name, + subsystems[i].suites[j].name); status = subsystems[i].suites[j].fn(argc - 1, argv + 1, prefix); goto end;