lib/benchmark_driver/output/compare.rb in benchmark_driver-0.9.2 vs lib/benchmark_driver/output/compare.rb in benchmark_driver-0.10.0
- old
+ new
@@ -1,27 +1,26 @@
# Compare output like benchmark-ips
class BenchmarkDriver::Output::Compare
NAME_LENGTH = 20
+ # @param [BenchmarkDriver::Metrics::Type] metrics_type
+ attr_writer :metrics_type
+
# @param [Array<BenchmarkDriver::*::Job>] jobs
# @param [Array<BenchmarkDriver::Config::Executable>] executables
- # @param [BenchmarkDriver::Metrics::Type] metrics_type
- def initialize(jobs:, executables:, metrics_type:)
+ def initialize(jobs:, executables:)
@jobs = jobs
@executables = executables
- @metrics_type = metrics_type
end
- # @param [BenchmarkDriver::Metrics] metrics
def with_warmup(&block)
without_stdout_buffering do
$stdout.puts 'Warming up --------------------------------------'
# TODO: show exec name if it has multiple ones
block.call
end
end
- # @param [BenchmarkDriver::Metrics] metrics
def with_benchmark(&block)
@metrics_by_job = Hash.new { |h, k| h[k] = [] }
without_stdout_buffering do
$stdout.puts 'Calculating -------------------------------------'