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:
parent
a215ff74cf
commit
8447cd4790
3 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
||||||
---
|
---
|
||||||
threshold: 16
|
threshold: 16
|
||||||
total_score: 607
|
total_score: 604
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
require 'benchmark'
|
||||||
require 'set'
|
require 'set'
|
||||||
require 'adamantium'
|
require 'adamantium'
|
||||||
require 'ice_nine'
|
require 'ice_nine'
|
||||||
|
|
|
@ -89,10 +89,10 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def run_with_benchmark
|
def run_with_benchmark
|
||||||
start_time = Time.now
|
times = Benchmark.measure do
|
||||||
@killed = run
|
@killed = run
|
||||||
end_time = Time.now
|
end
|
||||||
@runtime = end_time - start_time
|
@runtime = times.real
|
||||||
end
|
end
|
||||||
|
|
||||||
# Run killer
|
# Run killer
|
||||||
|
|
Loading…
Add table
Reference in a new issue