반응형
Python 스크립트를 프로파일 링 할 때 호출별로 cProfile 출력 정렬
나는 사용하고있다 python -m cProfile -s calls myscript.py
python -m cProfile -s percall myscript.py
작동하지 않습니다.
Python 문서에는 "유효한 정렬 값에 대해서는 Stats 문서를 참조하십시오 .": http://docs.python.org/library/profile.html#module-cProfile , 찾을 수 없습니다.
-s는 sort_stats 아래에있는 키만 사용 합니다.
calls (call count)
cumulative (cumulative time)
cumtime (cumulative time)
file (file name)
filename (file name)
module (file name)
ncalls (call count)
pcalls (primitive call count)
line (line number)
name (function name)
nfl (name/file/line)
stdname (standard name)
time (internal time)
tottime (internal time)
여기에 예가 있습니다.
python -m cProfile -s tottime myscript.py
반응형
'developer tip' 카테고리의 다른 글
파일 경로에 별표 두 개 (0) | 2020.12.05 |
---|---|
두 그래프 노드 사이의 모든 경로 찾기 (0) | 2020.12.05 |
"final int i"는 Java for 루프 내에서 어떻게 작동합니까? (0) | 2020.12.05 |
PHP에서 REST API를 빌드하려면 프레임 워크가 필요합니까? (0) | 2020.12.05 |
InvokeAsync와 BeginInvoke for WPF Dispatcher의 차이점은 무엇입니까? (0) | 2020.12.05 |