生活分享

  • 首页
HETAO
业余码农、业余机械爱好者
  1. 首页
  2. 未分类
  3. 正文

对Flask 初始化过程的 profile

2018年7月30日 600点热度 0人点赞 0条评论

如果是普通的flask页面profile建议使用WSGI Application Profiler

它会自动分析每一个页面,并profile,内部也是cprofile实现。

针对初始化过程只能手动使用cProfile:

python -m cProfile -o profiling run_web.py

等到初始化完毕再进入python ide:

>>> import pstats
>>> stats = pstats.Stats('profiling')
>>> stats.sort_stats('time').print_stats(10)

 

Post Views: 658
标签: 暂无
最后更新:2019年7月24日

jinzhao

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

COPYRIGHT © 2022 生活分享. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

浙ICP备14004285号-1