推荐学习书目
› 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 · Jan 23, 2017 · 2127 views
    This topic created in 3532 days ago, the information mentioned may be changed or developed.
    现在有一个基于 django 的 url 的响应时间在 4-5s(后端),我想知道问题出在哪个函数,或哪个代码段?
    最笨的办法就是打 log.

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

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

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

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

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

    // django debug toolbar 提供函数级别的监控 ,手动在 pannel 那里 加 Profiling pannel 就好了,精准到代码每行的性能
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1081 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:56 · PVG 01:56 · LAX 10:56 · JFK 13:56
    ♥ Do have faith in what you're doing.