카테고리 없음
컴파일시 -pg 옵션 추가
# g++ -pg -g -o sample sample.cpp

# gprof sample > sample_profile.txt

인자가 있을 경우 그냥 실행하면 gmon.out 이 생긴다 그 파일을 이용하여 gprof로 분석 가능
# ./sample score.json

gmon.out을 이용한 분석
# gprof sample gmon.out > sample_profile.txt

결과 보기
# vim sample_profile.txt

결과를 볼 수 있다.