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. 超线程技术