Skip to content

Instantly share code, notes, and snippets.

@taf2
Created December 22, 2009 19:00
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 taf2/261949 to your computer and use it in GitHub Desktop.
Save taf2/261949 to your computer and use it in GitHub Desktop.
### bugcheck.rb:
$TOPDIR = File.expand_path(File.join(File.dirname(__FILE__)))
$EXTDIR = File.join($TOPDIR, 'ext')
$LIBDIR = File.join($TOPDIR, 'lib')
$:.unshift($LIBDIR)
$:.unshift($EXTDIR)
require 'curb'
$count = 0
m = Curl::Multi.new
def add_c(m)
c = Curl::Easy.new("http://127.0.0.1:4567/")
$count += 1
#puts "adding: #{$count}" if($count % 2 == 1)
c.on_success {|easy| add_c(m) } if $count < 10000
m.add(c)
end
add_c(m)
m.perform
puts "done"
### srv.rb:
require 'rubygems'
require 'sinatra'
get '/' do
"hello"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment