推荐学习书目
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
kamushin
V2EX  ›  Python

以下哪种是正确的 web 压测方式?

  •  
  •   kamushin · Jul 17, 2015 · 4322 views
    This topic created in 3983 days ago, the information mentioned may be changed or developed.
    1. 每秒开1000个线程去fetch,不设置timeout.相当于每秒1000个新用户
    2. 开个大小为1000的线程池,保持1000的并发fetch.
    8 replies    2015-07-18 21:46:25 +08:00
    gameboy90
        1
    gameboy90  
       Jul 17, 2015 via Android
    正确的压测不仅仅关注加压机的并发数量,更加关注被压机的connect_time, response_time, idle, io等指标
    zonghua
        2
    zonghua  
       Jul 17, 2015
    然而功能性还有很多虫。
    chinabrowser
        3
    chinabrowser  
       Jul 18, 2015 via Android
    花钱找人DDoS
    inmyfree
        4
    inmyfree  
       Jul 18, 2015
    为啥不用ab呢?
    jedihy
        5
    jedihy  
       Jul 18, 2015
    第一种方式你的客户端估计撑不过30s,栈就爆了。第二种好一些,但是个人认为应该单线程io复用如epoll的方式去做压测。
    bobai
        6
    bobai  
       Jul 18, 2015
    @chinabrowser 那和第一种有什么区别?效果应该是一样的吧?
    chinabrowser
        7
    chinabrowser  
       Jul 18, 2015
    @bobai 这个占用的资源可比第一种多多了..
    kamushin
        8
    kamushin  
    OP
       Jul 18, 2015
    @jedihy 我确实用gevent去做压测的。用的第二种。不过我觉得第二种指标上没意义。tps是按照第一种的说法来的吧,也就是所谓的每秒能做完多少事情。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2818 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 14:39 · PVG 22:39 · LAX 07:39 · JFK 10:39
    ♥ Do have faith in what you're doing.