Histogram `exceeds` metric 1 hour threshold

📗 API Reference Docs Problem

  • Version: v11.10.0+

Location

Section of the site where the content exists

Performance measurement APIs

Affected URL(s):

Description

The histogram exceeds metric description might be incorrect or at least vague in explaining what is being measured.

histogram.exceeds
The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.


I havent seen any code implementation of the mentioned maximum 1 hour event loop delay threshold..

My walkthrough in the code:

  1. Histogram::RecordDelta tracks the delta time between now and the last time it was called. (code)

  2. exceeds is incremented when hdr_record_value(,delta) returns true (code)

  3. The hdr_record_values function is what determines this metric (code)
    a. value is always bigger than 0 in our case.
    b. exceeds is incremented if this condition is true:

counts_index = counts_index_for(h, value);

if (counts_index < 0 || h->counts_len <= counts_index) { ... }

counts_index is the index of the last counts that happened in the delta duration. Hence exceeds will increment whenever there is no counts during the last resolution time.

Is my understanding corrent here? CC @jasnell as I believe he's implemented this feature


  • I would like to work on this issue and
    submit a pull request.