class PageResponseScale
Records the response time of a web page
Attributes
location[RW]
Public Instance Methods
measure()
click to toggle source
returns a new Measure
with response time of the :location
# File lib/mobiusloop/scales/page_response_scale.rb, line 13 def measure @location = "http://google.com" if @location == nil time = Benchmark.measure do response = Net::HTTP.get_response(URI.parse(@location)) end Measure.new(time.real) end