class ParallelTests

def self.with_runtime_info(tests)

def self.with_runtime_info(tests)
  lines = File.read(runtime_log).split("\n") rescue []
  # use recorded test runtime if we got enough data
  if lines.size * 1.5 > tests.size
    puts "Using recorded test runtime"
    times = Hash.new(1)
    lines.each do |line|
      test, time = line.split(":")
      times[test] = time.to_f
    end
    tests.sort.map{|test| [test, times[test]] }
  else # use file sizes
    tests.sort.map{|test| [test, File.stat(test).size] }
  end
end