Repository navigation
test: update empty histogram expectations for histogram 0.12.1 - #66879
Open
fcostaoliveira wants to merge 2 commits into
Open
fcostaoliveira wants to merge 2 commits into
fcostaoliveira wants to merge 2 commits into
Conversation
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 <filipe@redis.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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 🚀 New features to boost your workflow:
|
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.
Refs: #66818
HdrHistogram_c 0.12.1 (#178, #183, release) makes an empty histogram report
min0 (wasINT64_MAX) andmean/stddev0 (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.jsUser-visible: an empty
createHistogram()ormonitorEventLoopDelay()histogram now hasmin0,minBigInt0n,meanandstddev0, andmeanCI().mean0 (lower/upperstay NaN).max,countandpercentilesare unchanged. Code that checks emptiness viaminorisNaN(mean)should usecount === 0. The docs do not state these values.The alternative is to special-case
count == 0insrc/histogram.ccto 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.