Skip to content

Commit

Permalink
perf bench: Improve sched-message.c with more comfortable output
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
  • Loading branch information
Hitoshi Mitake authored and Ingo Molnar committed Nov 10, 2009
1 parent ff676b1 commit c5659b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/perf/bench/sched-messaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c5659b7

Please sign in to comment.