class ParallelSpecs::SpecRuntimeLogger
def example_passed(example)
def example_passed(example) file = example.location.split(':').first @example_times[file] += Time.now - @time end
def example_started(*args)
def example_started(*args) @time = Time.now end
def initialize(options, output=nil)
def initialize(options, output=nil) super @example_times = Hash.new(0) end
def start_dump(*args)
def start_dump(*args) return unless ENV['TEST_ENV_NUMBER'] #only record when running in parallel # TODO: Figure out why sometimes time can be less than 0 lock_output do @output.puts @example_times.map { |file, time| "#{file}:#{time > 0 ? time : 0}" } end @output.flush end