Class: Autotuner::RequestCollector
- Inherits:
-
Object
- Object
- Autotuner::RequestCollector
- Defined in:
- lib/autotuner/request_collector.rb
Constant Summary collapse
- HEURISTICS_POLLING_FREQUENCY =
100
- DEBUG_EMIT_FREQUENCY =
1000
Instance Method Summary collapse
-
#initialize ⇒ RequestCollector
constructor
A new instance of RequestCollector.
- #request ⇒ Object
Constructor Details
#initialize ⇒ RequestCollector
Returns a new instance of RequestCollector.
8 9 10 11 12 13 14 15 16 |
# File 'lib/autotuner/request_collector.rb', line 8 def initialize @request_count = 0 @request_context = RequestContext.new @system_context = SystemContext.new @heuristics = Autotuner.supported_heuristics.map { |h| h.new(@system_context) } end |
Instance Method Details
#request ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/autotuner/request_collector.rb', line 18 def request before_request yield ensure after_request end |