Skip to content

Instantly share code, notes, and snippets.

@esparkman
Created June 3, 2010 21:52
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 esparkman/424551 to your computer and use it in GitHub Desktop.
Save esparkman/424551 to your computer and use it in GitHub Desktop.
Exception: wrong number of arguments
Total HTTP Requests 4
Total GIF Requests
counter = 1
begin
file = File.new("performance.log", "r")
while (line = file.gets)
#puts "#{counter}: #{line}"
counter = counter + 1
total = counter
if line =~ /gif/
gifCount = line.count
end
end
file.close
rescue => err
puts "Exception: #{err}"
err
end
puts "Total HTTP Requests #{total}"
puts "Total GIF Requests #{gifCount}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment