Change Mutant::Killer#run_with_benchmark to use Benchmark.measure

* Use the real time temporarily to be consistent with the other
  places in the code that measure time. When those other areas can
  be wrapped in a Benchmark.measure block all the benchmarks will be
  updated to use cpu time, not real (elapsed) time like now.
This commit is contained in:
Dan Kubb 2013-06-23 15:12:33 -07:00
parent a215ff74cf
commit 8447cd4790
3 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,3 @@
---
threshold: 16
total_score: 607
total_score: 604

View file

@ -1,3 +1,4 @@
require 'benchmark'
require 'set'
require 'adamantium'
require 'ice_nine'

View file

@ -89,10 +89,10 @@ module Mutant
# @api private
#
def run_with_benchmark
start_time = Time.now
@killed = run
end_time = Time.now
@runtime = end_time - start_time
times = Benchmark.measure do
@killed = run
end
@runtime = times.real
end
# Run killer