Electric.Telemetry.IntervalTimer (electric v1.2.4)

View Source

Times intervals between calls to start_interval/2. This is useful if you want to find out which part of a process took the longest time. It works out simpler than wrapping each part of the process in a timer, and guarentees no gaps in the timings.

The simplest way to use the timer is to store the timer state in the process memory, see OpenTelemetry.start_interval. This module should only be used directly if you do not want to use the process memory.

Summary

Types

t()

@type t() :: [{binary(), non_neg_integer()}]

Functions

durations(state, opts \\ [])

init()

start_interval(state, interval_name, opts \\ [])

time()

total_time(durations)