Class: Harness::Timer

Inherits:
Measurement show all
Defined in:
lib/harness.rb

Instance Attribute Summary

Attributes inherited from Measurement

#name, #rate, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Measurement

#sample_rate

Class Method Details

.from_event(event) ⇒ Object



34
35
36
37
38
# File 'lib/harness.rb', line 34

def self.from_event(event)
  timer = super
  timer.value = event.duration
  timer
end

Instance Method Details

#logObject



44
45
46
# File 'lib/harness.rb', line 44

def log
  Harness.timing name, ms, sample_rate
end

#msObject



40
41
42
# File 'lib/harness.rb', line 40

def ms
  value
end