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



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

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

Instance Method Details

#logObject



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

def log
  Harness.timing name, ms, sample_rate
end

#msObject



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

def ms
  value
end