Re: [PATCH 1/1] perf stat: Add support to print counts for fixed times

From: Jiri Olsa
Date: Tue Jan 23 2018 - 09:24:58 EST


On Wed, Jan 17, 2018 at 01:37:25PM +0100, ufo19890607 wrote:
> From: yuzhoujian <yuzhoujian@xxxxxxxxxxxxxxx>
>
> Introduce a new option to print counts for fixed number of times
> and update perf-stat documentation accordingly.
>
> Show below is the output of the new option for perf stat.
>
> $perf stat -I 1000 --times-print 2 -e cycles -a
> # time counts unit events
> 1.002827089 93,884,870 cycles
> 2.004231506 56,573,446 cycles

you can do that with following command:

[jolsa@krava perf]$ sudo ./perf stat -I 1000 -e cycles -a sleep 2
# time counts unit events
1.000160132 437,471,026 cycles
2.000367121 729,415,520 cycles
2.000857390 1,407,820 cycles


jirka