lib/benchmark_driver/output.rb in benchmark_driver-0.12.0 vs lib/benchmark_driver/output.rb in benchmark_driver-0.13.0
- old
+ new
@@ -6,15 +6,15 @@
#
# Runner should call its interface in the following manner:
# metrics=
# with_warmup
# with_job(name:)
- # with_context(name:, executable:)
+ # with_context(name:, executable:, gems:)
# report(values:, duration: nil, loop_count: nil, environment: {})
# with_benchmark
# with_job(name:)
- # with_context(name:, executable:)
+ # with_context(name:, executable:, gems:)
# report(values:, duration: nil, loop_count: nil, environment: {})
class Output
require 'benchmark_driver/output/compare'
require 'benchmark_driver/output/markdown'
require 'benchmark_driver/output/record'
@@ -63,13 +63,12 @@
end
end
# @param [String] name
# @param [BenchmarkDriver::Config::Executable] executable
- # @param [Float] duration
- # @param [Integer] loop_count
- def with_context(name:, executable:, &block)
- context = BenchmarkDriver::Context.new(name: name, executable: executable)
+ # @param [Hash{ String => String}] gems
+ def with_context(name:, executable:, gems: {}, &block)
+ context = BenchmarkDriver::Context.new(name: name, executable: executable, gems: gems)
@output.with_context(context) do
block.call
end
end