1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/benchmark/lib/benchmark_driver/runner/cstime.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
669 B
Ruby
Raw Normal View History

require 'benchmark_driver/runner/total'
class BenchmarkDriver::Runner::Cstime < BenchmarkDriver::Runner::Total
METRIC = BenchmarkDriver::Metric.new(name: 'cstime', 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(klass: Job, metrics: [METRIC])
private
# Overriding BenchmarkDriver::Runner::Total#metric
def metric
METRIC
end
# Overriding BenchmarkDriver::Runner::Total#target
def target
:cstime
end
end