当前位置: 技术问答>linux和unix
程序運行時間,time的使用
来源: 互联网 发布时间:2016-06-02
本文导语: sh-3.2# time ./testjpg green.jpg real 0m0.140s user 0m0.120s sys 0m0.020s real ,user ,sys各代表什麼的時間呢和單位為什麼 thx | 每一个的单位为秒... real: the elapsed real time between ...
sh-3.2# time ./testjpg green.jpg
real 0m0.140s
user 0m0.120s
sys 0m0.020s
real ,user ,sys各代表什麼的時間呢和單位為什麼
thx
real 0m0.140s
user 0m0.120s
sys 0m0.020s
real ,user ,sys各代表什麼的時間呢和單位為什麼
thx
|
每一个的单位为秒...
real: the elapsed real time between invocation and termination
user: the user CPU time (the sum of the tms_utime and tms_cutime values in a struct tms as returned by times(2)
sys : the system CPU time (the sum of the tms_stime and tms_cstime values in a struct tms as returned by times(2))
real: the elapsed real time between invocation and termination
user: the user CPU time (the sum of the tms_utime and tms_cutime values in a struct tms as returned by times(2)
sys : the system CPU time (the sum of the tms_stime and tms_cstime values in a struct tms as returned by times(2))
|
real %e
user %U
sys %S
%e (Not in tcsh.) Elapsed real time (in seconds).
%S Total number of CPU-seconds that the process spent in kernel mode.
%U Total number of CPU-seconds that the process spent in user mode.
分别代表的东西都说的很清楚啦....
user %U
sys %S
%e (Not in tcsh.) Elapsed real time (in seconds).
%S Total number of CPU-seconds that the process spent in kernel mode.
%U Total number of CPU-seconds that the process spent in user mode.
分别代表的东西都说的很清楚啦....