How do I read the output of the IPython %prun (profiler) command?

旧巷老猫 提交于 2019-11-30 07:56:18
Thomas K

It's just a convenient wrapper for Python's own profiler, the documentation for which is here:

http://docs.python.org/library/profile.html#module-pstats

Quoting:

ncalls for the number of calls,

tottime for the total time spent in the given function (and excluding time made in calls to sub-functions),

percall is the quotient of tottime divided by ncalls

cumtime is the total time spent in this and all subfunctions (from invocation till exit). This figure is accurate even for recursive functions.

percall is the quotient of cumtime divided by primitive calls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!