Skip to content

Instantly share code, notes, and snippets.

@kennethkalmer
Created November 24, 2009 20:58
Show Gist options
  • Select an option

  • Save kennethkalmer/242210 to your computer and use it in GitHub Desktop.

Select an option

Save kennethkalmer/242210 to your computer and use it in GitHub Desktop.
Simple patron vs em-http-client observation
#
# Patron vs em-http-client
#
# This is not science, it is the same test suite on the same laptop running Ruby 1.9.1 on Leopard
# (ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin9.8.0]).
#
# Some insight into the matter might be found here: http://curl.haxx.se/mail/archive-2008-09/0075.html
#
# Build the master of em-http-request
#
$ git clone git://github.com/igrigorik/em-http-request.git
$ cd em-http-request
$ gem build
$ gem install pkg/em-http-request-0.2.2.gem
#
# Install patron
#
$ gem install patron
#
# Now clone rufus-jig from github
#
$ git clone git://github.com/kennethkalmer/rufus-jig.git
$ git checkout em-http-request
#
# Run the test server, open a new console
#
$ ruby test/server.rb
#
# Run the tests, alternating between Patron and em-http-request
#
kenneth@Kenneth-Kalmers-MacBook-Pro ~/Code/FOSS/rufus-jig (em-http-request) $ ruby test/test.rb
Loaded suite test/test
Started
.................................
Finished in 16.125289 seconds.
33 tests, 110 assertions, 0 failures, 0 errors
kenneth@Kenneth-Kalmers-MacBook-Pro ~/Code/FOSS/rufus-jig (em-http-request) $ ruby test/test.rb -- --em
Loaded suite test/test
Started
.................................
Finished in 5.622955 seconds.
33 tests, 110 assertions, 0 failures, 0 errors
#
# DISCLAIMER
#
# This is far from an exact science, but it is an interesting observation.
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment