Module: BenchmarkDriver

Defined in:
lib/benchmark_driver/struct.rb,
lib/benchmark_driver/rbenv.rb,
lib/benchmark_driver/config.rb,
lib/benchmark_driver/output.rb,
lib/benchmark_driver/runner.rb,
lib/benchmark_driver/metrics.rb,
lib/benchmark_driver/version.rb,
lib/benchmark_driver/job_parser.rb,
lib/benchmark_driver/default_job.rb,
lib/benchmark_driver/ruby_interface.rb,
lib/benchmark_driver/default_job_parser.rb

Overview

All benchmark results should be expressed by this model.

Defined Under Namespace

Modules: DefaultJobParser, Output, Rbenv, Runner Classes: JobParser=Module.new, RubyInterface, Struct=Module.new

Constant Summary collapse

Config =

All CLI options

::BenchmarkDriver::Struct.new(
  :runner_type,  # @param [String]
  :output_type,  # @param [String]
  :paths,        # @param [Array<String>]
  :executables,  # @param [Array<BenchmarkDriver::Config::Executable>]
  :filters,      # @param [Array<Regexp>]
  :repeat_count, # @param [Integer]
  :run_duration, # @param [Integer]
  :verbose,      # @param [Integer]
  defaults: {
    runner_type: 'ips',
    output_type: 'compare',
    filters: [],
    repeat_count: 1,
    run_duration: 3,
    verbose: 0,
  },
)
Metrics =
::BenchmarkDriver::Struct.new(
  :value,      # @param [Float] - The main field of benchmark result
  :executable, # @param [BenchmarkDriver::Config::Executable] - Measured Ruby executable
  :duration,   # @param [Float,nil] - Time taken to run the script (optional)
)
VERSION =
'0.10.2'
DefaultJob =
::BenchmarkDriver::Struct.new(
  :name,       # @param [String] name - This is mandatory for all runner
  :script,     # @param [String] benchmark
  :prelude,    # @param [String,nil] prelude (optional)
  :teardown,   # @param [String,nil] after (optional)
  :loop_count, # @param [Integer,nil] loop_count (optional)
  defaults: { prelude: '', teardown: '' },
)