Skip to content

Instantly share code, notes, and snippets.

@lucaspiller
Created April 8, 2010 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucaspiller/360176 to your computer and use it in GitHub Desktop.
Save lucaspiller/360176 to your computer and use it in GitHub Desktop.
Patron benchmark
require 'rubygems'
require 'patron'
50.times do
Thread.new do
print "+ Start\n"
session = Patron::Session.new
session.timeout = 30000
session.connect_timeout = 30000
session.base_url = 'http://www.google.com/'
session.get 'search'
print "- Done\n"
end
end
while Thread.list.count > 1
# waiting for threads
sleep 0.1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment