lib/benchmark_driver/output/markdown.rb in benchmark_driver-0.9.2 vs lib/benchmark_driver/output/markdown.rb in benchmark_driver-0.10.0

- old
+ new

@@ -1,28 +1,27 @@ class BenchmarkDriver::Output::Markdown NAME_LENGTH = 8 + # @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 @name_length = jobs.map { |j| j.name.size }.max end - # @param [BenchmarkDriver::Metrics] metrics def with_warmup(&block) without_stdout_buffering do $stdout.print 'warming up' block.call end ensure $stdout.puts end - # @param [BenchmarkDriver::Metrics] metrics def with_benchmark(&block) @with_benchmark = true without_stdout_buffering do # Show header $stdout.puts "# benchmark results (#{@metrics_type.unit})\n\n"