Created
March 19, 2024 04:21
-
-
Save navyxliu/e4153245695bdcfd6eab38be36538d8f to your computer and use it in GitHub Desktop.
A scripp to count how many messages are dropped.
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
#!/usr/bin/env ruby | |
lines = ARGF.readlines | |
total = 0 | |
lines.each do |line| | |
if line =~ /(\d+)\smessages dropped due to async logging/ | |
num = $1.to_i | |
total = total + num | |
#print line | |
end | |
end | |
puts "#{total}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment