Sha256: 960140d8f427c909841df0c479bf97f8032a3016153d8114ea9adaad14d4b19a

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 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)

  METRICS_TYPE = BenchmarkDriver::Metrics::Type.new(unit: 's', larger_better: false)

  # 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,
      executable: executable,
    )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
benchmark_driver-0.10.16 lib/benchmark_driver/runner/time.rb
benchmark_driver-0.10.15 lib/benchmark_driver/runner/time.rb
benchmark_driver-0.10.14 lib/benchmark_driver/runner/time.rb