[英]Profiling CherryPy: convert results to graphic format
I try to profile my CherryPy web server and as a result I have some .prof
files. 我尝试配置我的CherryPy Web服务器的配置文件,结果我有了一些.prof
文件。 I can read them in text format by using web browser what was described in this post . 我可以通过使用Web浏览器以文本格式阅读它们,本文对此进行了介绍。 But I need to export the results into a calltree to profile using, for example, KCacheGrind or Gprof2Dot. 但是我需要使用例如KCacheGrind或Gprof2Dot将结果导出到调用树中进行配置。
But Gprof2Dot give me an error: 但是Gprof2Dot给我一个错误:
profile_results>gprof2dot.py -f prof out.prof | profile_results> gprof2dot.py -f prof out.prof | dot -Tpng -o out.png 点-Tpng -o out.png
error: unexpected end of file 错误:文件意外结束
And KCacheGrind doesn't know about .prof
files... 而且KCacheGrind不知道.prof
文件...
Are there any ways to take a calltree in graphic format? 有什么方法可以采用图形格式的呼叫树?
Thanks. 谢谢。
You need to use pstats. 您需要使用pstats。
gprof2dot -f pstats out.prof | dot -Tpng -o out.png
CherryPy uses python cProfile/profile. CherryPy使用python cProfile / profile。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.