답변:
당신은 time
명령. 가장 간단한 형태로 :
time [some command]
제공 :
real 0m0.103s
user 0m0.004s
sys 0m0.028s
보다 완전한 출력을 얻을 수도 있습니다.
/usr/bin/time -v [some command]
Command exited with non-zero status 1
Command being timed: "find ."
User time (seconds): 0.00
System time (seconds): 0.01
Percent of CPU this job got: 84%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2980
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 142
Voluntary context switches: 11
Involuntary context switches: 0
Swaps: 0
File system inputs: 80
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1
(bash를 사용할 때 전체 경로를 사용하여 빌드 인을 실행하지 않아야합니다. time
명령)
출력의 모든 항목은 실행 시간에 영향을줍니다.