src: add event loop based metrics into node#62935
Open
pabloerhard wants to merge 9 commits into
Open
Conversation
rochdev
reviewed
Apr 24, 2026
addaleax
reviewed
Apr 24, 2026
edb66ea to
e7093c8
Compare
6f5cdca to
bc0a59c
Compare
bengl
approved these changes
Apr 30, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62935 +/- ##
==========================================
- Coverage 89.65% 89.64% -0.02%
==========================================
Files 708 708
Lines 220413 220546 +133
Branches 42275 42290 +15
==========================================
+ Hits 197607 197702 +95
- Misses 14658 14675 +17
- Partials 8148 8169 +21
🚀 New features to boost your workflow:
|
bc0a59c to
27ead1e
Compare
add a samplePerIteration option to monitorEventLoopDelay that records event loop delay from libuv event loop iterations instead of the existing timer interval sampler. The default remains the interval based, uses of monitorEventLoopDelay() will still behave the same unless the samplePerIteration options is passed through. Signed-off-by: Pablo Erhard Hernandez <pablo.erhardhernandez@datadoghq.com>
Add test coverage for the per iteration event loop delay histogram start and stop callbacks Use disitinct debug tracking keys for the event loop delay histogram callbacks.
Use the super Close method instead of duplicating code
27ead1e to
3b21617
Compare
BridgeAR
reviewed
May 27, 2026
BridgeAR
reviewed
May 27, 2026
BridgeAR
reviewed
May 27, 2026
BridgeAR
reviewed
May 27, 2026
Added extra test to add coverage of the overall functionality of the new ELD histogram.
Modified docs to be on par with the changes and modifications made.
BridgeAR
approved these changes
Jun 17, 2026
Collaborator
The C++ class `ELDHistogram` is the per-iteration sampling implementation that sits next to `IntervalHistogram` (the timer-based one). Its name collided with the JS exposed `ELDHistogram` class that `monitorEventLoopDelay()` returns regardless of sampling mode, making the layering confusing: "ELDHistogram" was both the generic JS concept and the name of one specific C++ backing.
align perf_hooks docs after renaming internal ELDHistogram to IterationHistogram
71f121f to
88fce8d
Compare
Added shared templates for duplicated start/stop logic in IntevalHistogram and IterationHistogram.
50f8eab to
29b708d
Compare
BridgeAR
approved these changes
Jun 18, 2026
BridgeAR
left a comment
Member
There was a problem hiding this comment.
LGTM, while I would still like to get another LG who works on CPP frequently
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt in into monitorEventLoopDelay(), this option adds support for per iteration sampling using libuv hooks, while preserving the existing timer based approach.
When the new samplePerIteration option is set to true, monitorEventLoopDelay() samples directly from event loop iterations instead of using the interval timer. When samplePerIteration is omitted or false, the existing interval based implementation remains unchanged, including resolution handling and the older interval based trace counters.
Motivation
The interval based implementation has two limitations that the new option addresses:
This is an alternative implementation to the one in #62934
This PR directly addresses the following issue #56064