public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] perf bench: Make output more better
@ 2009-11-10 15:03 Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output Hitoshi Mitake
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hitoshi Mitake @ 2009-11-10 15:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Hitoshi Mitake

Hi,

This patch series makes output of perf bench more better.
Current style, keeping user wait and print everything
suddenly after finish, is not good.
And current formatting for values are too ugly.

Example (case of messaging):
| % 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]

Hitoshi Mitake (3):
  perf bench: Fix builtin-bench.c for more friendly output
  perf bench: Fix sched-pipe.c for more confortable output
  perf bench: Fix sched-message.c for more confortable output

 tools/perf/bench/sched-messaging.c |    6 +++---
 tools/perf/bench/sched-pipe.c      |   11 ++++++-----
 tools/perf/builtin-bench.c         |    4 ++++
 3 files changed, 13 insertions(+), 8 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output
  2009-11-10 15:03 [PATCH 0/3] perf bench: Make output more better Hitoshi Mitake
@ 2009-11-10 15:04 ` Hitoshi Mitake
  2009-11-10 19:00   ` [tip:perf/bench] perf bench: Improve " tip-bot for Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 3/3] perf bench: Fix sched-message.c for more confortable output Hitoshi Mitake
  2 siblings, 1 reply; 7+ messages in thread
From: Hitoshi Mitake @ 2009-11-10 15:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Hitoshi Mitake, Peter Zijlstra, Paul Mackerras

This patch makes output of perf bench more friendly.
Current style of putput, keeping user wait
and print everything suddenly after finish,
will confuse users. So I fixed it.

Example of use(case of messaging):
| % 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>
---
 tools/perf/builtin-bench.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index c7505ea..90c39ba 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -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;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output
  2009-11-10 15:03 [PATCH 0/3] perf bench: Make output more better Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output Hitoshi Mitake
@ 2009-11-10 15:04 ` Hitoshi Mitake
  2009-11-10 19:01   ` [tip:perf/bench] perf bench: Improve sched-pipe.c with more comfortable output tip-bot for Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 3/3] perf bench: Fix sched-message.c for more confortable output Hitoshi Mitake
  2 siblings, 1 reply; 7+ messages in thread
From: Hitoshi Mitake @ 2009-11-10 15:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Hitoshi Mitake, Peter Zijlstra, Paul Mackerras

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@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] perf bench: Fix sched-message.c for more confortable output
  2009-11-10 15:03 [PATCH 0/3] perf bench: Make output more better Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output Hitoshi Mitake
  2009-11-10 15:04 ` [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output Hitoshi Mitake
@ 2009-11-10 15:04 ` Hitoshi Mitake
  2009-11-10 19:01   ` [tip:perf/bench] perf bench: Improve sched-message.c with more comfortable output tip-bot for Hitoshi Mitake
  2 siblings, 1 reply; 7+ messages in thread
From: Hitoshi Mitake @ 2009-11-10 15:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Hitoshi Mitake, Peter Zijlstra, Paul Mackerras

This patch fixes sched-message.c for more confortable output.
Change points are comment style description and
formatting numerical values and its units.

Example of use:
| % 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>
---
 tools/perf/bench/sched-messaging.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 2cc5edc..0a86dea 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -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:
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:perf/bench] perf bench: Improve builtin-bench.c for more friendly output
  2009-11-10 15:04 ` [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output Hitoshi Mitake
@ 2009-11-10 19:00   ` tip-bot for Hitoshi Mitake
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Hitoshi Mitake @ 2009-11-10 19:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, mitake, tglx,
	mingo

Commit-ID:  79e295d4bd0f524257299e7c4e42f643f21abcc2
Gitweb:     http://git.kernel.org/tip/79e295d4bd0f524257299e7c4e42f643f21abcc2
Author:     Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Wed, 11 Nov 2009 00:04:00 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 10 Nov 2009 19:56:44 +0100

perf bench: Improve builtin-bench.c for more friendly output

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 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index c7505ea..90c39ba 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:perf/bench] perf bench: Improve sched-pipe.c with more comfortable output
  2009-11-10 15:04 ` [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output Hitoshi Mitake
@ 2009-11-10 19:01   ` tip-bot for Hitoshi Mitake
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Hitoshi Mitake @ 2009-11-10 19:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, mitake, tglx,
	mingo

Commit-ID:  ff676b193a401b23c84a79a7ec06559f3eaae917
Gitweb:     http://git.kernel.org/tip/ff676b193a401b23c84a79a7ec06559f3eaae917
Author:     Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Wed, 11 Nov 2009 00:04:01 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 10 Nov 2009 19:56:45 +0100

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>
---
 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..238185f 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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [tip:perf/bench] perf bench: Improve sched-message.c with more comfortable output
  2009-11-10 15:04 ` [PATCH 3/3] perf bench: Fix sched-message.c for more confortable output Hitoshi Mitake
@ 2009-11-10 19:01   ` tip-bot for Hitoshi Mitake
  0 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Hitoshi Mitake @ 2009-11-10 19:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, mitake, tglx,
	mingo

Commit-ID:  c5659b74f052150791750234f92dcfb29d27efa5
Gitweb:     http://git.kernel.org/tip/c5659b74f052150791750234f92dcfb29d27efa5
Author:     Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Wed, 11 Nov 2009 00:04:02 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 10 Nov 2009 19:56:46 +0100

perf bench: Improve sched-message.c with more comfortable output

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 |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 2cc5edc..605a2a9 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -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:

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-10 19:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 15:03 [PATCH 0/3] perf bench: Make output more better Hitoshi Mitake
2009-11-10 15:04 ` [PATCH 1/3] perf bench: Fix builtin-bench.c for more friendly output Hitoshi Mitake
2009-11-10 19:00   ` [tip:perf/bench] perf bench: Improve " tip-bot for Hitoshi Mitake
2009-11-10 15:04 ` [PATCH 2/3] perf bench: Fix sched-pipe.c for more confortable output Hitoshi Mitake
2009-11-10 19:01   ` [tip:perf/bench] perf bench: Improve sched-pipe.c with more comfortable output tip-bot for Hitoshi Mitake
2009-11-10 15:04 ` [PATCH 3/3] perf bench: Fix sched-message.c for more confortable output Hitoshi Mitake
2009-11-10 19:01   ` [tip:perf/bench] perf bench: Improve sched-message.c with more comfortable output tip-bot for Hitoshi Mitake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox