Path: blob/master/tools/perf/Documentation/perf-bench.txt
10821 views
perf-bench(1)1=============23NAME4----5perf-bench - General framework for benchmark suites67SYNOPSIS8--------9[verse]10'perf bench' [<common options>] <subsystem> <suite> [<options>]1112DESCRIPTION13-----------14This 'perf bench' command is general framework for benchmark suites.1516COMMON OPTIONS17--------------18-f::19--format=::20Specify format style.21Current available format styles are:2223'default'::24Default style. This is mainly for human reading.25---------------------26% perf bench sched pipe # with no style specified27(executing 1000000 pipe operations between two tasks)28Total time:5.855 sec295.855061 usecs/op30170792 ops/sec31---------------------3233'simple'::34This simple style is friendly for automated35processing by scripts.36---------------------37% perf bench --format=simple sched pipe # specified simple385.98839---------------------4041SUBSYSTEM42---------4344'sched'::45Scheduler and IPC mechanisms.4647SUITES FOR 'sched'48~~~~~~~~~~~~~~~~~~49*messaging*::50Suite for evaluating performance of scheduler and IPC mechanisms.51Based on hackbench by Rusty Russell.5253Options of *pipe*54^^^^^^^^^^^^^^^^^55-p::56--pipe::57Use pipe() instead of socketpair()5859-t::60--thread::61Be multi thread instead of multi process6263-g::64--group=::65Specify number of groups6667-l::68--loop=::69Specify number of loops7071Example of *messaging*72^^^^^^^^^^^^^^^^^^^^^^7374---------------------75% perf bench sched messaging # run with default76options (20 sender and receiver processes per group)77(10 groups == 400 processes run)7879Total time:0.308 sec8081% perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups82(20 sender and receiver threads per group)83(20 groups == 800 threads run)8485Total time:0.582 sec86---------------------8788*pipe*::89Suite for pipe() system call.90Based on pipe-test-1m.c by Ingo Molnar.9192Options of *pipe*93^^^^^^^^^^^^^^^^^94-l::95--loop=::96Specify number of loops.9798Example of *pipe*99^^^^^^^^^^^^^^^^^100101---------------------102% perf bench sched pipe103(executing 1000000 pipe operations between two tasks)104105Total time:8.091 sec1068.091833 usecs/op107123581 ops/sec108109% perf bench sched pipe -l 1000 # loop 1000110(executing 1000 pipe operations between two tasks)111112Total time:0.016 sec11316.948000 usecs/op11459004 ops/sec115---------------------116117SEE ALSO118--------119linkperf:perf[1]120121122