lib/benchmark_driver/runner/time.rb in benchmark_driver-0.11.1 vs lib/benchmark_driver/runner/time.rb in benchmark_driver-0.12.0
- old
+ new
@@ -1,13 +1,13 @@
require 'benchmark_driver/runner/ips'
class BenchmarkDriver::Runner::Time < BenchmarkDriver::Runner::Ips
+ METRIC = BenchmarkDriver::Metric.new(name: 'Execution time', unit: 's', larger_better: false)
+
# JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job"
Job = Class.new(BenchmarkDriver::DefaultJob)
# Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
- JobParser = BenchmarkDriver::DefaultJobParser.for(Job)
-
- METRIC = BenchmarkDriver::Metric.new(name: 'Execution time', unit: 's', larger_better: false)
+ JobParser = BenchmarkDriver::DefaultJobParser.for(klass: Job, metrics: [METRIC])
# Overriding BenchmarkDriver::Runner::Ips#metric
def metric
METRIC
end