Introduction to the profilers
cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how long various parts of the program executed. These statistics can be formatted into reports via the pstats module.
Reference
1. The Python Profilers
2. Python脚本性能剖析
3. 应用python的性能测量工具cProfile
4. 超线程技术

本文介绍如何使用cProfile和profile模块对Python程序进行性能剖析。通过这些工具可以收集到程序各部分执行频率及时间长度的统计数据,并利用pstats模块将数据整理成报告形式,帮助开发者定位程序瓶颈。
991

被折叠的 条评论
为什么被折叠?



