Question:
There is a compiled program written in C/C++
. How to measure the average execution time?
Using the time
utility, you can run the application once. Is there a similar utility that will do this n
times and print the average running time?
Answer:
~$ perf stat -r 100 ./program
https://github.com/Hellseher/cix/blob/master/spices/cix-perf.org