Class: Autotuner::SystemContext
- Inherits:
-
Object
- Object
- Autotuner::SystemContext
- Defined in:
- lib/autotuner/system_context.rb
Instance Attribute Summary collapse
-
#request_time_data ⇒ Object
readonly
Returns the value of attribute request_time_data.
Instance Method Summary collapse
- #debug_state ⇒ Object
-
#initialize ⇒ SystemContext
constructor
A new instance of SystemContext.
- #update(request_context) ⇒ Object
Constructor Details
#initialize ⇒ SystemContext
Returns a new instance of SystemContext.
7 8 9 |
# File 'lib/autotuner/system_context.rb', line 7 def initialize @request_time_data = DataStructure::DataPoints.new(Configuration::DATA_POINTS_COUNT) end |
Instance Attribute Details
#request_time_data ⇒ Object (readonly)
Returns the value of attribute request_time_data.
5 6 7 |
# File 'lib/autotuner/system_context.rb', line 5 def request_time_data @request_time_data end |
Instance Method Details
#debug_state ⇒ Object
15 16 17 18 19 |
# File 'lib/autotuner/system_context.rb', line 15 def debug_state { request_time_data: @request_time_data.debug_state, } end |
#update(request_context) ⇒ Object
11 12 13 |
# File 'lib/autotuner/system_context.rb', line 11 def update(request_context) @request_time_data.insert(request_context.request_time) end |