anancds / document

MIT License
1 stars 0 forks source link

python cProfile #95

Open anancds opened 4 years ago

anancds commented 4 years ago

ncalls,是指相应代码 / 函数被调用的次数; tottime,是指对应代码 / 函数总共执行所需要的时间(注意,并不包括它调用的其他代码 / 函数的执行时间); tottime percall,就是上述两者相除的结果,也就是tottime / ncalls; cumtime,则是指对应代码 / 函数总共执行所需要的时间,这里包括了它调用的其他代码 / 函数的执行时间; cumtime percall,则是 cumtime 和 ncalls 相除的平均结果。

anancds commented 4 years ago

python -m cProfile ***.py