私は使っています python -m cProfile -s calls myscript.py
python -m cProfile -s percall myscript.py
動作しません。
Pythonドキュメントは、「有効なソート値についての統計資料で確認してください。」と言う: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
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加