perf bench: Add sched-pipe.c: Benchmark for pipe() system call
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Thu, 5 Nov 2009 00:31:33 +0000 (09:31 +0900)
committerIngo Molnar <mingo@elte.hu>
Sun, 8 Nov 2009 09:19:18 +0000 (10:19 +0100)
commitc7d9300f367f480aee4663a0e3695c5b48859a1a
tree3377b76fd126f5fb075183151de62a6f0b7aa724
parente27454cc6352c4226ddc76f5e3a5dedd7dff456a
perf bench: Add sched-pipe.c: Benchmark for pipe() system call

This patch adds bench/sched-pipe.c.

bench/sched-pipe.c is a benchmark program
to measure performance of pipe() system call.
This benchmark is based on pipe-test-1m.c by Ingo Molnar:

   http://people.redhat.com/mingo/cfs-scheduler/tools/pipe-test-1m.c

Example of use:

% perf bench sched pipe
  (executing 1000000 pipe operations between two tasks)

          Total time:4.499 sec
                  4.499179 usecs/op
                  222262 ops/sec

% perf bench sched pipe -s -l 1000
0.015

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: fweisbec@gmail.com
Cc: Jiri Kosina <jkosina@suse.cz>
LKML-Reference: <1257381097-4743-4-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/bench/sched-pipe.c [new file with mode: 0644]