Sha256: 39c2c6fbd7db6c42e1b48a962c850a883fe7e4fc352ef88f27b1f363bf5dced2

Contents?: true

Size: 683 Bytes

Versions: 2

Compression:

Stored size: 683 Bytes

Contents

require 'benchmark_driver/runner/ips'

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)

  METRIC = BenchmarkDriver::Metric.new(name: 'Execution time', unit: 's', larger_better: false)

  # Overriding BenchmarkDriver::Runner::Ips#metric
  def metric
    METRIC
  end

  # Overriding BenchmarkDriver::Runner::Ips#value_duration
  def value_duration(duration:, loop_count:)
    [duration, duration]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
benchmark_driver-0.11.1 lib/benchmark_driver/runner/time.rb
benchmark_driver-0.11.0 lib/benchmark_driver/runner/time.rb