perf stat: display cvs output for --null runs
Jiri Olsa
reviewerPATCH 1/1 perf stat: display cvs output for --null runs
Adding support to display CVS values for --null runs as requested by Ingo. It's only for --null run so it does not mess up with standard CVS output.
For single --null run in CSV mode perf displays elapsed time:
$ perf stat --null -x ';' true 0.000496
For multiple --null run in CSV mode perf displays fields in this order:
- average elapsed time
- standard deviation
$ perf stat -r 5 --null -x ';' true 0.000339;0.000026
If --table is specified for above case, perf also displays new line for every individual run with fields:
- elapsed time
- delta from average ellapsed time
$ perf stat -r 5 --table --null -x ';' true 0.000496;0.000106 0.000363;-0.000027 0.000355;-0.000035 0.000372;-0.000018 0.000361;-0.000029 0.000390;0.000027
The last line shows average elapsed time with standard deviation.
Requested-by Ingo Molnar <[email protected]>
Acked-by Ingo Molnar <[email protected]>
Signed-off-by Jiri Olsa <[email protected]>
--- tools/perf/Documentation/perf-stat.txt | 30 ++++++++++++++++ tools/perf/util/stat-display.c | 48 +++++++++++++++++++------- 2 files changed, 65 insertions(+), 13 deletions(-)
tools/perf/Documentation/perf-stat.txt +30 -0
@@ -368,6 +368,36 @@ The fields are in this order: Additional metrics may be printed with all earlier fields being empty. +For single --null run in CSV mode perf displays elapsed time: + + $ perf stat --null -x ';' true + 0.000496 + +For multiple --null run in CSV mode perf displays fields in this order: + + - average elapsed time + - standard deviation + + $ perf stat -r 5 --null -x ';' true + 0.000339;0.000026 + +If --table is specified for above case, perf also displays new line +for every individual run with fields: + + - elapsed time + - delta from average ellapsed time + + $ perf stat -r 5 --table --null -x ';' true + 0.000496;0.000106 + 0.000363;-0.000027 + 0.000355;-0.000035 + 0.000372;-0.000018 + 0.000361;-0.000029 + 0.000390;0.000027 + +The last line shows average elapsed time with standard deviation. + + SEE ALSO -------- linkperf:perf-top[1], linkperf:perf-list[1]
tools/perf/util/stat-display.c +35 -13
88 lines not on this page · raw message
Signature · 1 line
2.20.1