Guest User

Untitled

a guest
May 27th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Exception: wrong number of arguments
  2. Total HTTP Requests 4
  3. Total GIF Requests
  4.  
  5.  
  6. counter = 1
  7. begin
  8. file = File.new("performance.log", "r")
  9. while (line = file.gets)
  10. #puts "#{counter}: #{line}"
  11. counter = counter + 1
  12. total = counter
  13.  
  14. if line =~ /gif/
  15. gifCount = line.count
  16. end
  17. end
  18. file.close
  19. rescue => err
  20. puts "Exception: #{err}"
  21. err
  22. end
  23.  
  24. puts "Total HTTP Requests #{total}"
  25. puts "Total GIF Requests #{gifCount}"
Add Comment
Please, Sign In to add comment