Bash 수행시간 측정

Jmnote (토론 | 기여)님의 2021년 11월 8일 (월) 23:39 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

Bash 수행시간 측정
리눅스 수행시간 측정
time 수행할명령어
time ( 수행할명령어 ) 2>/tmp/temp.txt
awk -F'[ ms]+' '/^real/ {print 1000*$2"ms"}' /tmp/temp.txt
rm -f /tmp/temp.txt

2 실습[ | ]

time sleep 2
time ( sleep 2 ) 2>/tmp/temp.txt
awk -F'[ ms]+' '/^real/ {print 1000*$2"ms"}' /tmp/temp.txt
jmnote@zetawiki:~$ time ( sleep 2 ) 2>/tmp/temp.txt
jmnote@zetawiki:~$ awk -F'[ ms]+' '/^real/ {print 1000*$2"ms"}' /tmp/temp.txt
2001ms
jmnote@zetawiki:~$ rm -f /tmp/temp.txt
jmnote@zetawiki:~$

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}