Sha256: 5cfe63e2609bba20bfd8d62501ecc3ba7100780591e20aa20352bc06dd2d03ad

Contents?: true

Size: 516 Bytes

Versions: 27

Compression:

Stored size: 516 Bytes

Contents

#!/usr/bin/env ruby
# go to ext/typhoeus and run ruby extconf.rb && make before running
# this.

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../ext")
require File.dirname(__FILE__) + "/../lib/typhoeus"

klass = Class.new { include Typhoeus }

loops = ENV['LOOPS'].to_i
url = ARGV.first || (raise "requires URL!")

loops.times do |i|
  puts "On loop #{i}" if i % 10 == 0
  results = []
  5.times do
    results << klass.get(url)
  end
 
  # fire requests
  results[0].code
end

puts "Ran #{loops} loops on #{url}!"

Version data entries

27 entries across 27 versions & 7 rubygems

Version Path
gravis-typhoeus-0.1.32 profilers/valgrind.rb
gravis-typhoeus-0.1.31 profilers/valgrind.rb
gravis-typhoeus-0.1.30 profilers/valgrind.rb
gravis-typhoeus-0.1.29 profilers/valgrind.rb
typhoeus-0.1.27 profilers/valgrind.rb
typhoeus-0.1.26 profilers/valgrind.rb
typhoeus-0.1.25 profilers/valgrind.rb