Class: Autotuner::Report::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/autotuner/report/base.rb

Constant Summary collapse

DISCLAIMER_MESSAGE =
<<~MSG
  It is always recommended to experiment with these suggestions as some suggestions may not always yield positive performance improvements. The recommended method is to perform A/B testing where a portion of traffic does not have the these suggested values and a portion of traffic with these suggested values.
MSG

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(heuristic_name, assist_message) ⇒ Base

Returns a new instance of Base.



12
13
14
15
# File 'lib/autotuner/report/base.rb', line 12

def initialize(heuristic_name, assist_message)
  @heuristic_name = heuristic_name
  @assist_message = assist_message
end

Instance Attribute Details

#assist_messageObject (readonly)

Returns the value of attribute assist_message.



10
11
12
# File 'lib/autotuner/report/base.rb', line 10

def assist_message
  @assist_message
end

#heuristic_nameObject (readonly)

Returns the value of attribute heuristic_name.



10
11
12
# File 'lib/autotuner/report/base.rb', line 10

def heuristic_name
  @heuristic_name
end

Instance Method Details

#to_sObject



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/autotuner/report/base.rb', line 17

def to_s
  msg = +assist_message
  msg << "\n"

  m = message
  if m
    msg << m
    msg << "\n"
  end

  msg << DISCLAIMER_MESSAGE
  msg.freeze
end