Class: ReReplay::RequestTimeMonitor

Inherits:
Object
  • Object
show all
Defined in:
lib/rereplay/monitors/request_time_monitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRequestTimeMonitor

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

#resultsObject (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