[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1257865442-20252-3-git-send-email-mitake@dcl.info.waseda.ac.jp>
Date: Wed, 11 Nov 2009 00:04:01 +0900
From: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org,
Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>
Subject: [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output
This patch fixes sched-pipe.c for more confortable output.
Change points are comment style description and
formatting numerical values and its units.
Example of use:
| % ./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@....info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
---
tools/perf/bench/sched-pipe.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c
index a9ac186..97291fe 100644
--- a/tools/perf/bench/sched-pipe.c
+++ b/tools/perf/bench/sched-pipe.c
@@ -92,17 +92,18 @@ int bench_sched_pipe(int argc, const char **argv,
switch (bench_format) {
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);
result_usec = diff.tv_sec * 1000000;
result_usec += diff.tv_usec;
- printf("\tTotal time:%lu.%03lu sec\n",
- diff.tv_sec, diff.tv_usec / 1000);
- printf("\t\t%lf usecs/op\n",
+ printf(" %14s:%lu.%03lu [sec]\n\n", "Total time",
+ diff.tv_sec, diff.tv_usec/1000);
+
+ printf(" %14lf usecs/op\n",
(double)result_usec / (double)loops);
- printf("\t\t%d ops/sec\n",
+ printf(" %14d ops/sec\n",
(int)((double)loops /
((double)result_usec / (double)1000000)));
break;
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists