-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
lib: fix emit warning for debuglog.time when disabled #54275
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
Conversation
Codecov ReportAttention: Patch coverage is
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
|
Co-authored-by: James M Snell <[email protected]>
Co-authored-by: James M Snell <[email protected]>
Co-authored-by: James M Snell <[email protected]>
Co-authored-by: James M Snell <[email protected]>
Landed in a7271ab |
PR-URL: #54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: #54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#54275 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
Tentatively backport in #56927 to reduce conflicts. Though this is not very essential and might get dropped. |
Backing it out from #56927 to avoid introducing surface for regressions. |
Fixes #54265
The code of debuglog.time was executing because the internal flag
timerFlags
had the value7
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.