You are not logged in.
What can I use to do performance measurement of a single command execution in terminal?
At the moment I am aware of something as "perf stat"
For example: perf stat gzip File.pdf
But is there anything else useful for this?
Last edited by kdar (2012-01-19 18:15:14)
Offline
What performance?
execution time: time ls -l will tell you how long the ls process took.
system calls: strace ls-l will tell you about all the library calls ls used.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Well, anything really. For example memory usage.
strace could be useful, I didn't know about it before, thanks.
For example I would like to know how much memory is used by something like : gzip file.pdf
Last edited by kdar (2012-01-19 20:40:38)
Offline
time can also show the memory usage and some other things using format strings.
Example: time -f "%M" gzip file.pdf (Shows maximum resident set size of the process during its lifetime, in Kbytes.)
All of them are described in the man page.
Offline
time can also show the memory usage and some other things using format strings.
Example: time -f "%M" gzip file.pdf (Shows maximum resident set size of the process during its lifetime, in Kbytes.)
All of them are described in the man page.
Apparently all that only applies to the standalone version of time which is not installed by default:
$ time -f "%M" <whatever>
bash: -f: command not found
real 0m0.001s
user 0m0.000s
sys 0m0.000s
$ which time
which: no time in ...
$ pkgfile -s time
extra/irssi
extra/time
community/calc
community/epic4
community/plan9port
$ pkgfile -l time
...
time /usr/bin/time
...
Last edited by alphaniner (2012-01-26 20:55:44)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline