Counter

object Counter
Companion:
class
class Object
trait Matchable
class Any
Counter.type

Type members

Classlikes

LongAdder-based counter implementation. LongAdder counters are safe to share across threads and provide superior write performance over Atomic values in cases where the writes largely outweigh the reads, which is the common case in Kamon counters (writing every time something needs to be tracked, reading roughly once per minute).

LongAdder-based counter implementation. LongAdder counters are safe to share across threads and provide superior write performance over Atomic values in cases where the writes largely outweigh the reads, which is the common case in Kamon counters (writing every time something needs to be tracked, reading roughly once per minute).

Value members

Concrete methods

def delta(supplier: Supplier[Long]): Consumer[Counter]

Creates a counter consumer function that stores the delta between the current and previous value generated by the provided supplier. This is specially useful when setting up auto-update actions on a counter from a cumulative counter, since Kamon's counters only track the number of events since the last tick.

Creates a counter consumer function that stores the delta between the current and previous value generated by the provided supplier. This is specially useful when setting up auto-update actions on a counter from a cumulative counter, since Kamon's counters only track the number of events since the last tick.

def delta(supplier: () => Long): Consumer[Counter]

Creates a counter consumer function that stores the delta between the current and previous value generated by the provided supplier. This is specially useful when setting up auto-update actions on a counter from a cumulative counter, since Kamon's counters only track the number of events since the last tick.

Creates a counter consumer function that stores the delta between the current and previous value generated by the provided supplier. This is specially useful when setting up auto-update actions on a counter from a cumulative counter, since Kamon's counters only track the number of events since the last tick.