Skip to content

Instantly share code, notes, and snippets.

@huned
Created February 20, 2015 20:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save huned/5408cd15b6741dbf575e to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
File.readlines('./tmp/5.log').each.with_index do |line, i|
matches = line.match(/\s+MOPED: \S+ (\w+)/i)
next if matches.nil?
op = matches.to_a.last.downcase
t = line.match(/\(([.0-9]+)ms\)$/i).to_a.last
puts "#{i},#{op},#{t}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment