Skip to content

perf_hooks: allow RecordableHistogram to record 0 - #66114

Open
jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:jasnell/perf-hooks-histogram-record-zero
Open

jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:jasnell/perf-hooks-histogram-record-zero

Conversation

@jasnell

@jasnell jasnell commented Sep 18, 2026

Copy link
Copy Markdown
Member

Previously the lowest value accepted was 1.

Includes a small node:bench fix also.

@jasnell jasnell added semver-minor PRs that contain new features and should be released in the next minor version. perf_hooks Issues and PRs related to the perf_hooks module and performance measurement APIs. labels Sep 18, 2026
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Sep 18, 2026
Comment thread doc/api/perf_hooks.md Outdated
Comment thread doc/api/perf_hooks.md Outdated
Previously the lowest value accepted was 1.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
Not all of the stream APIs are correctly loaded until
the `node:stream` module is loaded.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
@jasnell
jasnell force-pushed the jasnell/perf-hooks-histogram-record-zero branch from 8a9ad04 to e8e57a0 Compare September 18, 2026 18:50
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (dd5dfb5) to head (e8e57a0).

Files with missing lines Patch % Lines
src/histogram.cc 20.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66114   +/-   ##
=======================================
  Coverage   90.27%   90.28%           
=======================================
  Files         790      790           
  Lines      271651   271648    -3     
  Branches    51842    51839    -3     
=======================================
+ Hits       245228   245244   +16     
+ Misses      16928    16916   -12     
+ Partials     9495     9488    -7     
Files with missing lines Coverage Δ
lib/internal/bench_runner/benchmark.js 99.65% <100.00%> (-0.01%) ⬇️
lib/internal/bench_runner/benchmarks_stream.js 99.31% <100.00%> (ø)
lib/internal/histogram.js 97.22% <100.00%> (ø)
src/histogram.cc 85.82% <20.00%> (+0.14%) ⬆️

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jasnell
jasnell requested a review from ShogunPanda September 19, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. perf_hooks Issues and PRs related to the perf_hooks module and performance measurement APIs. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants