Skip to content

Instantly share code, notes, and snippets.

@lrvick
Created March 27, 2012 07:31
Show Gist options
  • Save lrvick/2213708 to your computer and use it in GitHub Desktop.
Save lrvick/2213708 to your computer and use it in GitHub Desktop.
Simple 1000 thread web server load test using eventlet
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