Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Website stress test in Python - Django

I'm trying to build a small stress test script 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?

like image 311
RadiantHex Avatar asked Apr 09 '10 02:04

RadiantHex


4 Answers

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.

like image 92
alecxe Avatar answered Oct 20 '22 01:10

alecxe


Why build it?

There are several available.

  1. For a single url and many requests try ab
  2. For multiple urls and random tests try siege
like image 30
Wolph Avatar answered Oct 20 '22 03:10

Wolph


If you want to stay within the Python framework you might try Corey Goldberg's Pylot or its successor multi-mechanize.

like image 11
cpt_ahag Avatar answered Oct 20 '22 02:10

cpt_ahag


Although this question is quite old, I'd like to point out a nifty tool about this problem. The tool is funkload.

like image 4
Luca Invernizzi Avatar answered Oct 20 '22 02:10

Luca Invernizzi