GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: update empty histogram expectations for histogram 0.12.1 by fcostaoliveira · Pull Request #66879 · nodejs/node

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Refs: #66818

HdrHistogram_c 0.12.1 (#178, #183, release) makes an empty histogram report min 0 (was INT64_MAX) and mean/stddev 0 (was NaN). Java, Go and Rust already did this, so it aligns the C library with them. #66818 fails four tests that pin the old values; this updates them:

  • test-perf-hooks-histogram.js, test-perf-hooks-histogram-snapshot.js, test-perf-hooks-histogram-stats.js, test-performance-eventloopdelay.js

User-visible: an empty createHistogram() or monitorEventLoopDelay() histogram now has min 0, minBigInt 0n, mean and stddev 0, and meanCI().mean 0 (lower/upper stay NaN). max, count and percentiles are unchanged. Code that checks emptiness via min or isNaN(mean) should use count === 0. The docs do not state these values.

The alternative is to special-case count == 0 in src/histogram.cc to keep the old values; I did not, to stay consistent with the other implementations. This must land with, or before, #66818.

Verification / AI disclosure: [edit to what you actually did]

AI assistance was used to prepare the change and this text. I built Node at the head of #66818 and ran the 49 perf_hooks/performance/histogram test files: 4 failed before, all pass after.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nodejs-github-bot and others added 2 commits October 18, 2026 00:54
@nodejs-github-bot
deps: update histogram to 0.12.1
d8a7ac1
@fcostaoliveira
test: expect zero min, mean and stddev for empty histograms
deaa9d0
HdrHistogram_c 0.12.1 (deps: update histogram to 0.12.1) makes an
empty histogram report 0 for hdr_min, hdr_mean and hdr_stddev, where
0.12.0 and earlier reported INT64_MAX and NaN. This brings the C
library in line with the Java, Go and Rust implementations, which
already return 0.

Update the assertions that pinned the old values for createHistogram(),
histogram.snapshot(), meanCI() and monitorEventLoopDelay() after a
reset. The old assertions fail against 0.12.1 and the new ones fail
against 0.12.0, so this has to land with the dependency update.

Signed-off-by: fcostaoliveira <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added dependencies PRs that add, update, or configure Node.js dependencies. needs-ci PRs that need a full CI run. labels Oct 20, 2026
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.51%. Comparing base (f88a1d2) to head (deaa9d0).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66879      +/-   ##
==========================================
+ Coverage   90.49%   90.51%   +0.01%     
==========================================
  Files         797      797              
  Lines      277780   278268     +488     
  Branches    53360    53468     +108     
==========================================
+ Hits       251388   251871     +483     
+ Misses      16791    16767      -24     
- Partials     9601     9630      +29     

see 60 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

We would need the tests to be compatible with both 0.12.0 and 0.12.1 – or patch the Nix version as well

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

dependencies PRs that add, update, or configure Node.js dependencies. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@fcostaoliveira @nodejs-github-bot @aduh95
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.