View Source Trifle.Stats.Buffer (Trifle.Stats v2.5.0)

Buffered write layer for Trifle.Stats.

Queues write operations (increment and set) and flushes them either when the queue reaches a configurable size or after a configurable duration. Supports optional aggregation, combining repeated operations on the same key set.

Summary

Types

@type t() :: %Trifle.Stats.Buffer{pid: pid()}

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

inc(keys, values, buffer, count \\ 1, tracking_key \\ nil)

View Source
@spec new(keyword()) :: t()
Link to this function

set(keys, values, buffer, count \\ 1, tracking_key \\ nil)

View Source
@spec start_link(keyword()) :: GenServer.on_start()