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

perf_hooks: fix checking range of options.figures in createHistogram #45999

Merged

Conversation

deokjinkim
Copy link
Contributor

For options.figures, number between 1 and 5 is allowed. So need to use validateInteger to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 28, 2022
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
@deokjinkim
Copy link
Contributor Author

deokjinkim commented Dec 28, 2022

For reference, we can't set max value we want(ex. 5) when we use validateUint32 because max value is fixed as 4_294_967_295 in validateUint32.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 28, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 28, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@deokjinkim
Copy link
Contributor Author

@aduh95 Could you please land this PR because this PR is created 1 week ago?

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 10, 2023
@nodejs-github-bot nodejs-github-bot merged commit 8282e65 into nodejs:main Jan 10, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 8282e65

RafaelGSS pushed a commit to RafaelGSS/node that referenced this pull request Jan 17, 2023
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
PR-URL: nodejs#45999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Jan 20, 2023
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
PR-URL: #45999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Jan 20, 2023
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
PR-URL: #45999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@juanarbol juanarbol mentioned this pull request Jan 28, 2023
juanarbol pushed a commit that referenced this pull request Jan 31, 2023
For `options.figures`, number between 1 and 5 is allowed. So need
to use `validateInteger` to limit max as 5.

Refs: https://github.com/nodejs/node/blob/main/doc/api/perf_hooks.md#perf_hookscreatehistogramoptions
PR-URL: #45999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants