You are not logged in.
Pages: 1
Hello,
the builtin time can be used to time process execution times. Is there some enhanced version of time? I could use features like, start the process 10 times and give statistics about execution times.
Thx!
Offline
Why not use a 'for' loop for this?
If you want mean and standard deviations statistics, you'd have to use some other tool to compute them.
Offline
Not a GNU/Linux discussion, moving to Apps & DEs...
Offline
GNU time (pacman -S time).
After install call with /usr/bin/time or create an alias in your .bashrc file (alias time="/usr/bin/time")
Offline
Regarding its man page http://man7.org/linux/man-pages/man1/time.1.html it does not seem to have a lot more features than builtin time, esp. no statistics over multiple run. Or have it?
Offline
They have different output formatting options, one may be easier parseable than the other, time(1) can show much more info, but it may be irrelevant in your situation.
Offline
lrzip provides its own nice and verbose output, but I cobbled this:
$ for i in 1 4 6 9; do /usr/bin/time -f'%E : %C' -ao foo lrzip -fqg -L$i test.tar -o $i.lrz; done; du -sh *.lrz | sort -k 2 > barSummary:
$ join -o 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 2.1 -1 8 -2 2 foo bar
0:00.07 : lrzip -fqg -L1 test.tar -o 1.lrz 292K
0:00.10 : lrzip -fqg -L4 test.tar -o 4.lrz 268K
0:00.17 : lrzip -fqg -L6 test.tar -o 6.lrz 256K
0:00.57 : lrzip -fqg -L9 test.tar -o 9.lrz 252KShort version:
$ join -o 1.1 1.5 2.1 -1 8 -2 2 foo bar
0:00.07 -L1 292K
0:00.10 -L4 268K
0:00.17 -L6 256K
0:00.57 -L9 252KYou can add headers, like 'time', 'compression level' and 'filesize' to make it prettier.
As for some statistic:
$ for i in 1 4 6 9; do /usr/bin/time -f'%e' -ao baz lrzip -fqg -L$i test.tar -o $i.lrz; done
$ cat baz
0.07
0.10
0.17
0.55$ datastat --dev --min --max baz | tr '#' ' ' | column -t
avg dev min max
0.2225 0.192532 0.07 0.55See e.g. http://stackoverflow.com/questions/9789 … s-in-linux
Offline
Pages: 1