Created
March 27, 2012 07:31
-
-
Save lrvick/2213708 to your computer and use it in GitHub Desktop.
Simple 1000 thread web server load test using eventlet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eventlet | |
from eventlet.green import urllib2 | |
def request(): | |
urllib2.urlopen("http://yourtarget.com").read() | |
print "%s request sent" | |
pool = eventlet.GreenPool(size=1000) | |
while True: | |
pool.spawn(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment