Python项目性能测试

概述

压测过程中看的应用程序性能指标主要有tps和响应时间。Python2.5以后自带cProfile代码时间监控性能指标

详解

指标

cProfile:python -m cProfile -s tottime your_program.py  对应用程序的一个时间监控工具:监控程序的每一行代码

  图(一)

ncalls:函数总共调用次数

tottime:这个函数总共调用花费时间

percall:每个调用平均花费时间

cumtime:总共累计花费时间

percall:每个调用的平均累积时间

filename:文件名

监控

内存泄漏与垃圾回收

线程状态

参考链接:

https://blog.csdn.net/weixin_40304570/article/details/79459811

https://blog.csdn.net/weixin_34144848/article/details/90557228

转载引用请标明出处,本博出自喝了少不如不喝的博客https://home.cnblogs.com/u/wangdadada
原文地址:https://www.cnblogs.com/wangdadada/p/12331592.html