수요일, 8월 16, 2006

python profile

* profile 파일 생성
import profile
profile.run('main()', 'profile.db')

* profile 분석 하기
$ python
import pstats
p = pstats.Stats('profile.db')
p.sort_stats('time').print_stats(10)