perf bench: Improve sched-pipe.c with more comfortable output
This patch improves sched-pipe.c with more comfortable output. Change points are comment style description and formatting numerical values and its units. Example: | % ./perf bench sched pipe | # Running sched/pipe benchmark... | # Extecuted 1000000 pipe operations between two tasks | | Total time:5.822 [sec] | | 5.822553 usecs/op | 171745 ops/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-3-git-send-email-mitake@dcl.info.waseda.ac.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
79e295d4bd
commit
ff676b193a
@@ -92,17 +92,18 @@ int bench_sched_pipe(int argc, const char **argv,
|
|||||||
|
|
||||||
switch (bench_format) {
|
switch (bench_format) {
|
||||||
case BENCH_FORMAT_DEFAULT:
|
case BENCH_FORMAT_DEFAULT:
|
||||||
printf("(executing %d pipe operations between two tasks)\n\n",
|
printf("# Extecuted %d pipe operations between two tasks\n\n",
|
||||||
loops);
|
loops);
|
||||||
|
|
||||||
result_usec = diff.tv_sec * 1000000;
|
result_usec = diff.tv_sec * 1000000;
|
||||||
result_usec += diff.tv_usec;
|
result_usec += diff.tv_usec;
|
||||||
|
|
||||||
printf("\tTotal time:%lu.%03lu sec\n",
|
printf(" %14s: %lu.%03lu [sec]\n\n", "Total time",
|
||||||
diff.tv_sec, diff.tv_usec/1000);
|
diff.tv_sec, diff.tv_usec/1000);
|
||||||
printf("\t\t%lf usecs/op\n",
|
|
||||||
|
printf(" %14lf usecs/op\n",
|
||||||
(double)result_usec / (double)loops);
|
(double)result_usec / (double)loops);
|
||||||
printf("\t\t%d ops/sec\n",
|
printf(" %14d ops/sec\n",
|
||||||
(int)((double)loops /
|
(int)((double)loops /
|
||||||
((double)result_usec / (double)1000000)));
|
((double)result_usec / (double)1000000)));
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user