python 函数性能分析

1 使用profile分析函数性能
示例1, 以profile为例:
import profile
def profileTest():
Total =1;
for i in range(10):
Total=Total*(i+1)
print Total
return Total
if __name__ == "__main__":
profile.run("profileTest()")


 

posted on 2016-03-16 20:50  qmzp  阅读(306)  评论(0编辑  收藏  举报

导航