Module: Autotuner::Configuration

Included in:
Autotuner
Defined in:
lib/autotuner/configuration.rb

Constant Summary collapse

DATA_POINTS_COUNT =
1_000

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debug_reporterObject

Set this callback to report debug information periodically.



12
13
14
# File 'lib/autotuner/configuration.rb', line 12

def debug_reporter
  @debug_reporter
end

#metrics_reporterObject

Returns the value of attribute metrics_reporter.



9
10
11
# File 'lib/autotuner/configuration.rb', line 9

def metrics_reporter
  @metrics_reporter
end

#reporterObject

Returns the value of attribute reporter.



8
9
10
# File 'lib/autotuner/configuration.rb', line 8

def reporter
  @reporter
end

#sample_ratioObject

Returns the value of attribute sample_ratio.



7
8
9
# File 'lib/autotuner/configuration.rb', line 7

def sample_ratio
  @sample_ratio
end

Instance Method Details

#enabled=(enabled) ⇒ Object

Raises:

  • (ArgumentError)


18
19
20
21
22
# File 'lib/autotuner/configuration.rb', line 18

def enabled=(enabled)
  raise ArgumentError, "cannot configure `enabled` when `sample_ratio` is configured" if sample_ratio

  @enabled = enabled
end

#enabled?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/autotuner/configuration.rb', line 14

def enabled?
  @enabled
end