#!/usr/bin/env ruby

LKP_SRC = ENV['LKP_SRC'] || File.dirname(File.dirname(File.realpath($PROGRAM_NAME)))

require "#{LKP_SRC}/lib/string_ext"

while (line = STDIN.gets)
  line = line.resolve_invalid_bytes

  case line.chomp!
  when /^\s*\d+\.\d+ MB \/\s+\d+\.\d+ sec =\s+(\d+\.\d+) Mbps/
    puts 'throughput_Mbps: ' + $1
  end
end
