自分用メモ
1. コードにライブラリをインポートする
from cProfile import Profile
# コードエディタに記述する
2. ターミナルでコマンド実行する
$ python3 -m cProfile sample.py
> 248 function calls (247 primitive calls) in 3.079 seconds
> Ordered by: standard name
> ncalls  tottime  percall  cumtime  percall filename:lineno(function)
> 1       0.000    0.000    3.079    3.079   sample.py:2(<module>)