Method: HoneyFormat::BenchmarkCLI#expected_runtime_seconds

Defined in:
lib/honey_format/cli/benchmark_cli.rb

#expected_runtime_seconds(report_count:) ⇒ Integer

Returns the expected runtime in seconds

Parameters:

  • report_count (Integer)

    number of reports in benchmark

Returns:

  • (Integer)

    expected runtime in seconds


30
31
32
33
34
35
36
# File 'lib/honey_format/cli/benchmark_cli.rb', line 30

def expected_runtime_seconds(report_count:)
  runs = report_count * options[:lines_multipliers].length
  warmup_time_seconds = runs * options[:benchmark_warmup]
  bench_time_seconds = runs * options[:benchmark_time]

  warmup_time_seconds + bench_time_seconds
end