Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix emit warning for debuglog.time when disabled #54275

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

H4ad
Copy link
Member

@H4ad H4ad commented Aug 8, 2024

Fixes #54265

The code of debuglog.time was executing because the internal flag timerFlags had the value 7 and the comparison was wrong, instead of checking if the enum flags were activated (2 | 4), I was just making a === comparison.

Now this behavior is fixed by just doing the comparison correctly, I also added a test to track this regression.

In theory, this bug slowed down a little bit all the requires but not too much since the heavy part was skipped.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Aug 8, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.10%. Comparing base (9e6c526) to head (44e8eb1).
Report is 473 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/util/debuglog.js 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54275      +/-   ##
==========================================
- Coverage   87.10%   87.10%   -0.01%     
==========================================
  Files         647      648       +1     
  Lines      181754   182214     +460     
  Branches    34880    34969      +89     
==========================================
+ Hits       158323   158715     +392     
- Misses      16742    16786      +44     
- Partials     6689     6713      +24     
Files with missing lines Coverage Δ
lib/internal/util/debuglog.js 91.36% <57.14%> (+1.13%) ⬆️

... and 58 files with indirect coverage changes

@H4ad H4ad added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 13, 2024
@H4ad H4ad added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 15, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS mentioned this pull request Aug 26, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 27, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 27, 2024
@nodejs-github-bot nodejs-github-bot merged commit a7271ab into nodejs:main Aug 27, 2024
61 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in a7271ab

@H4ad H4ad deleted the fix-gh-54265 branch August 27, 2024 18:14
RafaelGSS pushed a commit that referenced this pull request Aug 30, 2024
PR-URL: #54275
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Aug 30, 2024
PR-URL: #54275
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@targos targos added the dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. label Sep 22, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#54275
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unactionable "Label ... already exists for debuglog.time" warning since Node.js 22.6
6 participants