Sha256: 63e98b72e3c66d951fd7056a205fdb24b69ce37325ed56f1c470a29e8d379150
Contents?: true
Size: 387 Bytes
Versions: 26
Compression:
Stored size: 387 Bytes
Contents
#!/usr/bin/env ruby require 'net/http' $running = true trap('INT') { $running = false } STDIN.each do |line| break unless $running begin uri = URI(line.chomp) start = Time.now.to_f res = Net::HTTP.get_response(uri) finish = Time.now.to_f bench = (finish - start) puts "#{res.code} #{uri}" rescue => e puts "ERROR: #{e.message} #{uri}" end end
Version data entries
26 entries across 26 versions & 1 rubygems