perf bench: Improve sched-message.c with more comfortable output
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Tue, 10 Nov 2009 15:04:02 +0000 (00:04 +0900)
committerIngo Molnar <mingo@elte.hu>
Tue, 10 Nov 2009 18:56:46 +0000 (19:56 +0100)
This patch improves sched-message.c with more comfortable output.

Change points are comment style description and
formatting numerical values and its units.

Example:

 | % perf bench sched messaging
 | # Running sched/messaging benchmark...
 | # 20 sender and receiver processes per group
 | # 10 groups == 400 processes run
 |
 |      Total time: 1.490 [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-4-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
tools/perf/bench/sched-messaging.c

index 2cc5edcca3d6c48d6f6096030889b05d83d55b83..605a2a959aa839e11e846e88fe47f91bb22d01e0 100644 (file)
@@ -314,12 +314,12 @@ int bench_sched_messaging(int argc, const char **argv,
 
        switch (bench_format) {
        case BENCH_FORMAT_DEFAULT:
-               printf("(%d sender and receiver %s per group)\n",
+               printf("# %d sender and receiver %s per group\n",
                       num_fds, thread_mode ? "threads" : "processes");
-               printf("(%d groups == %d %s run)\n\n",
+               printf("# %d groups == %d %s run\n\n",
                       num_groups, num_groups * 2 * num_fds,
                       thread_mode ? "threads" : "processes");
-               printf("\tTotal time:%lu.%03lu sec\n",
+               printf(" %14s: %lu.%03lu [sec]\n", "Total time",
                       diff.tv_sec, diff.tv_usec/1000);
                break;
        case BENCH_FORMAT_SIMPLE: