TL;DR
Is there any way to make perf stat output time elapsed when -x is supplied?
Background
I executed perf stat -e instructions:u make run, and the output is pasted below.
Performance counter stats for 'make run':
53,781,961,288 instructions:u
2.802749955 seconds time elapsed
21.453244000 seconds user
0.249223000 seconds sys
I would like to parse number of instructions and time elapsed, so I add the -x option to make the output separated by comma, and the corresponding output is pasted below.
53781782267,,instructions:u,20694056846,100.00,,
I noticed that all the time measurements weren't displayed, so I checked the output of perf help stat. In the CSV FORMAT section, I found that run time of counter, optional metric value, and optional unit of metric may have something to do with my needs, but I couldn't figure out how exactly.