Commit 8fac4c5
perf_hooks: fix checking range of
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>options.figures in createHistogram1 parent 7e1462d commit 8fac4c5Copy full SHA for 8fac4c5
File tree
Expand file treeCollapse file tree
2 files changed
+8
-2
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+8
-2
lines changedOpen diff view settings
Collapse file
+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
40 | 39 | |
41 | 40 | |
42 | 41 | |
| ||
368 | 367 | |
369 | 368 | |
370 | 369 | |
371 | | - |
| 370 | + |
372 | 371 | |
373 | 372 | |
374 | 373 | |
|
Collapse file
test/parallel/test-perf-hooks-histogram.js
Copy file name to clipboardExpand all lines: test/parallel/test-perf-hooks-histogram.js+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
135 | 135 | |
136 | 136 | |
137 | 137 | |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
138 | 145 | |
139 | 146 | |
140 | 147 | |
|
0 commit comments