perf bench: Improve builtin-bench.c for more friendly output
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Tue, 10 Nov 2009 15:04:00 +0000 (00:04 +0900)
committerIngo Molnar <mingo@elte.hu>
Tue, 10 Nov 2009 18:56:44 +0000 (19:56 +0100)
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 <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257865442-20252-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-bench.c

index c7505eaff84bb064177676a7e45a609806934d0b..90c39baae0de0bf9fe58c2ddb94caca8f8ab1556 100644 (file)
@@ -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;