Liking cljdoc? Tell your friends :D

lb.metrics.histograms

Histogram implementation for Prometheus metrics.

Provides cumulative bucket histograms compatible with Prometheus format.

Histogram implementation for Prometheus metrics.

Provides cumulative bucket histograms compatible with Prometheus format.
raw docstring

default-latency-bucketsclj

Default bucket boundaries for latency measurements (in seconds). Covers 1ms to 10s range with fine granularity for sub-100ms.

Default bucket boundaries for latency measurements (in seconds).
Covers 1ms to 10s range with fine granularity for sub-100ms.
sourceraw docstring

format-histogramclj

(format-histogram histogram metric-name labels)

Format a histogram as Prometheus exposition format.

Returns a string with _bucket, _sum, and _count lines.

Format a histogram as Prometheus exposition format.

Returns a string with _bucket, _sum, and _count lines.
sourceraw docstring

format-histogram-familyclj

(format-histogram-family histogram-map metric-name help-text label-keys)

Format a family of histograms (same metric, different label combinations).

histogram-map: map of label-values -> histogram metric-name: the base metric name help-text: description for HELP line label-keys: ordered vector of label keys (e.g., [:proxy_name :target_id])

Format a family of histograms (same metric, different label combinations).

histogram-map: map of label-values -> histogram
metric-name: the base metric name
help-text: description for HELP line
label-keys: ordered vector of label keys (e.g., [:proxy_name :target_id])
sourceraw docstring

get-percentileclj

(get-percentile histogram percentile)

Estimate a percentile from histogram data. Note: This is an approximation based on bucket boundaries.

Estimate a percentile from histogram data.
Note: This is an approximation based on bucket boundaries.
sourceraw docstring

histogram-statsclj

(histogram-stats histogram)

Get basic statistics from a histogram.

Get basic statistics from a histogram.
sourceraw docstring

merge-histogramsclj

(merge-histograms h1 h2)

Merge two histograms with the same bucket boundaries.

Merge two histograms with the same bucket boundaries.
sourceraw docstring

new-histogramclj

(new-histogram)
(new-histogram buckets)

Create a new histogram with the given bucket boundaries.

Returns a map with: :buckets - vector of bucket upper bounds :counts - vector of cumulative counts per bucket :sum - running sum of all observations :count - total number of observations

Create a new histogram with the given bucket boundaries.

Returns a map with:
  :buckets - vector of bucket upper bounds
  :counts  - vector of cumulative counts per bucket
  :sum     - running sum of all observations
  :count   - total number of observations
sourceraw docstring

observeclj

(observe histogram value)

Record an observation in the histogram.

Updates all buckets where the observation is <= the bucket boundary (cumulative histogram as required by Prometheus).

Record an observation in the histogram.

Updates all buckets where the observation is <= the bucket boundary
(cumulative histogram as required by Prometheus).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close