Class: Metriks::Derive
- Inherits:
-
Meter
- Object
- Meter
- Metriks::Derive
- Defined in:
- lib/metriks-derive.rb
Instance Method Summary collapse
Instance Method Details
#mark(val = 1) ⇒ Object
32 33 34 35 36 |
# File 'lib/metriks-derive.rb', line 32 def mark(val = 1) @last ||= Atomic.new(val) last = @last.swap(val) super(last > val ? val : val - last) end |