Last active
November 22, 2016 19:15
-
-
Save benr75/3a18542b2f12a0074ed8bbafa30de119 to your computer and use it in GitHub Desktop.
Quick script to check how long it takes to get an http resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'curb' | |
if ARGV[0].nil? || ARGV[1].nil? | |
puts "usage 'ruby checkfeed.rb FEEDURL TIMESTORUN'" | |
else | |
ttr = ARGV[1].to_i | |
x = 0 | |
while x < ttr | |
http = Curl.get(ARGV[0]) | |
puts http.total_time | |
x = x + 1 | |
sleep(5) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment