作者amigcamel (阿吉amig)
看板Python
标题[问题] 记录python script的效能使用
时间Fri Jan 10 12:24:47 2014
想请问一下
有没有简单的方式可以记录
某一个python script或function在执行时
所消耗的cpu memory ...等等
已经查到一些可能跟这相关的东西有
top (linux command)
psutil (python module)
但是还是不太了解
有人愿意分享一下经验嘛?
我的用途主要是做效能回报
PS. OS为Ubuntu
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.4.198
1F:推 DemonDeath:简单的python tool有line_profiler跟memory_profiler 01/10 15:20
2F:→ amigcamel:line_profiler 可以profile CPU usage 吗? 01/10 15:58
3F:推 Wush978:OS中直接用system call 查/proc/<pid>/status来看状态 01/11 00:09