Sha256: d664bc8d4a7c58bcd3f35ed4e17e797446f8839322dc12315d470e8adb46e7de

Contents?: true

Size: 794 Bytes

Versions: 20

Compression:

Stored size: 794 Bytes

Contents

require 'benchmark_driver/struct'

# All benchmark results should be expressed by this model.
module BenchmarkDriver
  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)
  )

  Metrics::Type = ::BenchmarkDriver::Struct.new(
    :unit,          # @param [String] - A label of unit for the value.
    :larger_better, # @param [TrueClass,FalseClass] - If true, larger value is preferred when measured multiple times.
    :worse_word,    # @param [String] - A label shown when the value is worse.
    defaults: { larger_better: true, worse_word: 'slower' },
  )
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
benchmark_driver-0.10.16 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.15 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.14 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.13 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.12 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.11 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.10 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.9 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.8 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.7 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.6 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.5 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.4 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.3 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.2 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.1 lib/benchmark_driver/metrics.rb
benchmark_driver-0.10.0 lib/benchmark_driver/metrics.rb
benchmark_driver-0.9.2 lib/benchmark_driver/metrics.rb
benchmark_driver-0.9.1 lib/benchmark_driver/metrics.rb
benchmark_driver-0.9.0 lib/benchmark_driver/metrics.rb