Class: ReReplay::RequestTimeMonitor
- Inherits:
-
Object
- Object
- ReReplay::RequestTimeMonitor
- Defined in:
- lib/rereplay/monitors/request_time_monitor.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #finish(request) ⇒ Object
-
#initialize ⇒ RequestTimeMonitor
constructor
A new instance of RequestTimeMonitor.
Constructor Details
#initialize ⇒ RequestTimeMonitor
Returns a new instance of RequestTimeMonitor.
5 6 7 |
# File 'lib/rereplay/monitors/request_time_monitor.rb', line 5 def initialize @results = [] end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
4 5 6 |
# File 'lib/rereplay/monitors/request_time_monitor.rb', line 4 def results @results end |
Instance Method Details
#finish(request) ⇒ Object
9 10 11 |
# File 'lib/rereplay/monitors/request_time_monitor.rb', line 9 def finish(request) @results[request.index] = {:url => request.url, :duration => request.finish - request.actual_start, :scheduled_start => request.scheduled_start, :actual_start => request.actual_start} end |