#!/usr/bin/env ruby
while (line = STDIN.gets)
- case line.chomp!
- when /transactions:\s+(\d+)/
puts "transactions: #{$1}"
- when /95th percentile:\s+(\S+)/
puts "95th percentile: #{$1}"
- end
- case line.chomp!
- when /transactions:\s+(\d+)/
no need to add chomp! for the lineif not match /xxx$/
Thanks, Luan Shengde
- puts "transactions: #{$1}"
- when /95th percentile:\s+(\S+)/
- puts "95th percentile: #{$1}"
- end
end
2.23.0