I'm pretty familiar with most of the options available to the perf-stat command but I've never understood why anyone would want to use the --null option. The help text for this option reads,

-n, --null null run - dont start any counters

Then I came across this commit to the Linux kernel tree from Peter Zijlstra and it suddenly became clear that --null allows you to use the other features of perf-stat, such as its ability to repeatedly execute a command via --repeat, without the overhead incurred from using performance counters.

In short, you can use perf-stat as a simple benchmark wrapper or harness to execute a program and print runtime statistics.

For example, if you've got a micro-benchmark that executes some operations and you care about the time it took to perform those operations (as opposed to the number of operations), you can use perf-stat to run the program a number of times and print the average (arithmetic mean) time it took to run the program along with the coefficient of variance,

# perf stat --null --repeat 5 -- ./hackbench 21 process 1000
Running with 21*40 (== 840) tasks.
Time: 0.624
Running with 21*40 (== 840) tasks.
Time: 0.552
Running with 21*40 (== 840) tasks.
Time: 0.502
Running with 21*40 (== 840) tasks.
Time: 0.520
Running with 21*40 (== 840) tasks.
Time: 0.498

 Performance counter stats for './hackbench 21 process 1000' (5 runs):

       0.602524721 seconds time elapsed                                          ( +-  4.96% )