Skip to content

Instantly share code, notes, and snippets.

@blakesmith
Created March 22, 2012 02:12
Show Gist options
  • Save blakesmith/2155186 to your computer and use it in GitHub Desktop.
Save blakesmith/2155186 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'typhoeus'
100000.times do |t|
Thread.new do
puts "requesting - #{t}"
@req = Typhoeus::Request.new("http://#{ARGV[0]}:#{ARGV[1]}",
:method => :post,
:body => "something=somethingelse")
Typhoeus::Hydra.hydra.queue @req
Typhoeus::Hydra.hydra.run
end
end
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
post '/' do
"hello there!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment