V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
chaleaoch
V2EX  ›  Python

求助,<django/ Python >的<性能分析/性能测试><最佳实践>?

  •  
  •   chaleaoch · 2017-01-23 18:15:33 +08:00 · 1399 次点击
    这是一个创建于 2710 天前的主题,其中的信息可能已经有所发展或是发生改变。
    现在有一个基于 django 的 url 的响应时间在 4-5s(后端),我想知道问题出在哪个函数,或哪个代码段?
    最笨的办法就是打 log.

    年前正好有一点时间,不知道成熟的业界方案是?请各位 juju 指点一二.

    django debug toolbar 只能提供 sql 级别的.

    但是我这边遇到的问题和 sql 关系不大,主要还是 python 的性能引起的,(因为有大量的计算在里面).

    谢谢大家.
    2 条回复    2017-01-23 18:48:36 +08:00
    janxin
        1
    janxin  
       2017-01-23 18:38:24 +08:00 via iPhone
    wph95
        2
    wph95  
       2017-01-23 18:48:36 +08:00   ❤️ 1
    基本上是找个 apm 解决问题
    国内 oneapm , python 端 原来代码直接抄 new relic 的,加密都不加密 变量都不换,不知道现在咋么样。
    国外 new relic 。
    不过上面都要点钱

    所以推荐
    opbeat , 存一天不要钱 ,对 django 原声支持,你看下官网就知道了。

    // django debug toolbar 提供函数级别的监控 ,手动在 pannel 那里 加 Profiling pannel 就好了,精准到代码每行的性能
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5041 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:35 · PVG 15:35 · LAX 00:35 · JFK 03:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.