Class: Harness::Counter

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

Instance Attribute Summary

Attributes inherited from Measurement

#name, #rate, #value

Instance Method Summary collapse

Methods inherited from Measurement

from_event, #sample_rate

Instance Method Details

#logObject



49
50
51
52
53
54
55
# File 'lib/harness.rb', line 49

def log
  if value.nil?
    Harness.increment name, sample_rate
  else
    Harness.count name, value, sample_rate
  end
end