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