Skip to content

Instantly share code, notes, and snippets.

@fnielsen
Created October 3, 2012 12:24
Show Gist options
  • Save fnielsen/3826666 to your computer and use it in GitHub Desktop.
Save fnielsen/3826666 to your computer and use it in GitHub Desktop.
CherryPy vs Tornado benchmarking
#########
# Tornado
wget https://raw.github.com/facebook/tornado/master/demos/helloworld/helloworld.py
python helloworld.py
# 100 concurrent
ab -c 100 -n 1000 -k localhost.localdomain:8888/ | grep "Time taken for tests:"
# Time taken for tests: 0.709 seconds
# 5 concurrent
ab -c 5 -n 10000 -k localhost.localdomain:8888/ | grep "Time taken for tests:"
# Time taken for tests: 7.211 seconds
###########
# CherryPy
wget https://raw.github.com/gist/3819040/c05d432a0d4e261b37ef6a55b2a8f7d4f4584c76/hellocherry.py
python hellocherry.py
# 100 concurrent
ab -c 100 -n 1000 -k localhost.localdomain:8080/ | grep "Time taken for tests:"
# Time taken for tests: 31.721 seconds
# 5 concurrent
ab -c 5 -n 10000 -k localhost.localdomain:8080/ | grep "Time taken for tests:"
# Time taken for tests: 16.500 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment