module

LavinMQ::GCPauseRecorder

Records Boehm GC stop-the-world pauses in a histogram.

The collection event callback runs inside the collector with the allocation lock held, so it must not allocate, log or touch fibers. Counters are written from that callback and read by scrapes on other threads, so they're relaxed atomics.

The class vars below are initialized at program start. Don't make them lazy: a lazy initializer is guarded by __crystal_once, which may lock, and would first run inside the callback.

Constants

BUCKETS = StaticArray[0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0]

Class methods

each_bucket

Yields each upper bound (nil for +Inf) with its cumulative count

Source
install
Source
record(nanoseconds : UInt64) : Nil
Source
sum

Seconds

Source