lib/benchmark_driver/runner/time.rb in benchmark_driver-0.9.2 vs lib/benchmark_driver/runner/time.rb in benchmark_driver-0.10.0

- old
+ new

@@ -3,11 +3,16 @@ class BenchmarkDriver::Runner::Time < BenchmarkDriver::Runner::Ips # 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) - # Passed to `output` by `BenchmarkDriver::Runner.run` - MetricsType = BenchmarkDriver::Metrics::Type.new(unit: 's') + + METRICS_TYPE = BenchmarkDriver::Metrics::Type.new(unit: 's') + + # Overriding BenchmarkDriver::Runner::Ips#set_metrics_type + def set_metrics_type + @output.metrics_type = METRICS_TYPE + end # Overriding BenchmarkDriver::Runner::Ips#build_metrics def build_metrics(duration:, executable:, loop_count:) BenchmarkDriver::Metrics.new( value: duration,