I'm trying to build a small stress test script开发者_Python百科 to test how quickly a set of requests gets done.
Need to measure speed for 100 requests.
Problem is that I wouldn't know how to implement it, as it would require parallel url requests to be called. Any ideas?
Also, there is an awesome open-source pure-python distributed and scaleable locust framework that uses greenlets. It's great at simulating enormous amount of simultaneous users.
Why build it?
There are several available.
- For a single url and many requests try ab
- For multiple urls and random tests try siege
If you want to stay within the Python framework you might try Corey Goldberg's Pylot or its successor multi-mechanize.
Although this question is quite old, I'd like to point out a nifty tool about this problem. The tool is funkload.
I'm not sure if this exactly the type of testing you were looking for but BrowserMob uses Selenium to do browser load testing. It works as if many browsers were pounding on your site simultaneously. It isn't created for any specific framework and should work on pretty much any web app.
精彩评论