René's URL Explorer Experiment


Title: perf_hooks.performance.timerify() with histogram: RangeError [ERR_OUT_OF_RANGE] on arm64 · Issue #41641 · nodejs/node · GitHub

Open Graph Title: perf_hooks.performance.timerify() with histogram: RangeError [ERR_OUT_OF_RANGE] on arm64 · Issue #41641 · nodejs/node

X Title: perf_hooks.performance.timerify() with histogram: RangeError [ERR_OUT_OF_RANGE] on arm64 · Issue #41641 · nodejs/node

Description: Version v14, v16, v17, v18, v26 Platform macOS v12.4 (21F79). Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 Subsystem perf_hooks What steps will reproduce the bu...

Open Graph Description: Version v14, v16, v17, v18, v26 Platform macOS v12.4 (21F79). Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 Subsystem per...

X Description: Version v14, v16, v17, v18, v26 Platform macOS v12.4 (21F79). Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 Subsystem per...

Opengraph URL: https://github.com/nodejs/node/issues/41641

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"perf_hooks.performance.timerify() with histogram: RangeError [ERR_OUT_OF_RANGE] on arm64","articleBody":"### Version\n\nv14, v16, v17, v18, v26\n\n### Platform\n\nmacOS v12.4 (21F79).\n\nDarwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64\n\n### Subsystem\n\nperf_hooks\n\n### What steps will reproduce the bug?\n\nRun this snippet:\n\n```js\nimport {createHistogram, performance} from 'node:perf_hooks';\n\nconst fn = () => {};\n\nconst timerified = performance.timerify(fn, {histogram: createHistogram()});\n\nfor (let i = 0; i \u003c 100_000; i++) {\n\ttry {\n\t\ttimerified();\n\t} catch (error) {\n\t\tconsole.error('Crashed on iteration', i);\n\n\t\tthrow error;\n\t}\n}\n```\n\n### How often does it reproduce? Is there a required condition?\n\n100% consistent reproduction, requires arm64, maybe requires macOS.\n\n### What is the expected behavior?\n\nCalling the timerified function returned from `perf_hooks.performance.timerify()` should successfully record to the histogram.\n\n### What do you see instead?\n\n```\nnode:internal/errors:466\n    ErrorCaptureStackTrace(err);\n    ^\n\nRangeError [ERR_OUT_OF_RANGE]: The value of \"val\" is out of range. It must be a safe integer greater than 0. Received 0\n    at new NodeError (node:internal/errors:377:5)\n    at RecordableHistogram.record (node:internal/histogram:290:13)\n    at processComplete (node:internal/perf/timerify:40:15)\n    at timerified fn (node:internal/perf/timerify:88:5)\n    at file:///Users/jonah/programming/benchmark/index.mjs:9:3\n    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)\n    at async Promise.all (index 0)\n    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)\n    at async loadESM (node:internal/process/esm_loader:85:5)\n    at async handleMainPromise (node:internal/modules/run_main:61:12) {\n  code: 'ERR_OUT_OF_RANGE'\n}\n\nNode.js v18.1.0\n```\n\n### Additional information\n\nOriginally reported here: https://github.com/sindresorhus/yoctocolors/pull/9#issuecomment-1019033882\n\n---\n\nThe bug appears to be from the implementation of `perf_hooks.performance.timerify()` with a histogram, when calling the returned timerified function. The error comes from the input validation of `RecordableHistogram#record()`, attempting to record a value `x \u003c 1` will throw. For whatever reason `timerify()` seems to be recording an execution duration of 0 and trying to record that. See the error stacktrace for more info.","author":{"url":"https://github.com/jonahsnider","@type":"Person","name":"jonahsnider"},"datePublished":"2022-01-22T07:10:51Z","url":"https://github.com/nodejs/node/issues/41641"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8179c5a1-7191-ff1a-6b7f-5b3b608707cc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9070:137C1B:31C49B:40E516:6AED1DAA
html-safe-nonce8daf81fce30d8969e406f18a66b23eea9555efeb9e07006e7c85dbe956960e2d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDcwOjEzN0MxQjozMUM0OUI6NDBFNTE2OjZBRUQxREFBIiwidmlzaXRvcl9pZCI6IjgwNDAzMDM5MDk0ODMxMjYxODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac87c4eab6163e4a414310030fa523c9f7d5543b9a7764ab8df75b1b234d8e78c7
hovercard-subject-tagissue:1111307705
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/41641/issue_layout
twitter:imagehttps://opengraph.githubassets.com/da94628baad9bbb25903d7c87e8086a3c5c062cbb83c45bd8b817d7ea2ff8ffe/nodejs/node/issues/41641
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/da94628baad9bbb25903d7c87e8086a3c5c062cbb83c45bd8b817d7ea2ff8ffe/nodejs/node/issues/41641
og:image:altVersion v14, v16, v17, v18, v26 Platform macOS v12.4 (21F79). Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 Subsystem per...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejonahsnider
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/41641#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F41641
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F41641
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/41641
Reloadhttps://github.com/nodejs/node/issues/41641
Reloadhttps://github.com/nodejs/node/issues/41641
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues655 (655)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/41641
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/41641
perf_hooks.performance.timerify() with histogram: RangeError [ERR_OUT_OF_RANGE] on arm64https://github.com/nodejs/node/issues/41641#top
perf_hooksIssues and PRs related to the perf_hooks module and performance measurement APIs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22perf_hooks%22
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
https://github.com/jonahsnider
jonahsniderhttps://github.com/jonahsnider
on Jan 22, 2022https://github.com/nodejs/node/issues/41641#issue-1111307705
sindresorhus/yoctocolors#9 (comment)https://github.com/sindresorhus/yoctocolors/pull/9#issuecomment-1019033882
https://github.com/benjamingr
benjamingrhttps://github.com/benjamingr
on Jan 22, 2022https://github.com/nodejs/node/issues/41641#issuecomment-1019111010
@jasnellhttps://github.com/jasnell
Mesteeryhttps://github.com/Mesteery
perf_hooksIssues and PRs related to the perf_hooks module and performance measurement APIs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22perf_hooks%22
on Jan 22, 2022https://github.com/nodejs/node/issues/41641#event-5936299052
https://github.com/jonahsnider
jonahsniderhttps://github.com/jonahsnider
on May 28, 2022https://github.com/nodejs/node/issues/41641#issuecomment-1140154855
https://github.com/everett1992
everett1992https://github.com/everett1992
on Oct 5, 2023https://github.com/nodejs/node/issues/41641#issuecomment-1747847537
https://github.com/nodejs/node/blob/v18.x/lib/internal/perf/timerify.js#L38-L40https://github.com/nodejs/node/blob/v18.x/lib/internal/perf/timerify.js#L38-L40
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jun 25, 2026https://github.com/nodejs/node/issues/41641#issuecomment-4795125256
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jun 25, 2026https://github.com/nodejs/node/issues/41641#event-27173626827
https://github.com/jonahsnider
jonahsniderhttps://github.com/jonahsnider
on Jun 25, 2026https://github.com/nodejs/node/issues/41641#issuecomment-4795246229
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jun 26, 2026https://github.com/nodejs/node/issues/41641#event-27227466194
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 25, 2026https://github.com/nodejs/node/issues/41641#issuecomment-5825156484
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Sep 25, 2026https://github.com/nodejs/node/issues/41641#event-31802742797
https://github.com/jonahsnider
jonahsniderhttps://github.com/jonahsnider
on Sep 25, 2026https://github.com/nodejs/node/issues/41641#issuecomment-5825427939
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
a2dedcchttps://github.com/nodejs/node/commit/a2dedccee05392b56847e18214768181f940c477
on Sep 25, 2026https://github.com/nodejs/node/issues/41641#event-31858059956
pullhttps://github.com/apps/pull
on Sep 25, 2026https://github.com/nodejs/node/issues/41641#event-31858335690
perf_hooks: allow RecordableHistogram to record 0https://github.com/ganjanggejang/node/commit/a2dedccee05392b56847e18214768181f940c477
a2dedcchttps://github.com/ganjanggejang/node/commit/a2dedccee05392b56847e18214768181f940c477
lib: fix stream loading bug in node:benchhttps://github.com/ganjanggejang/node/commit/990aefdf5662b2181ce47c5009b301c2bfbceae6
990aefdhttps://github.com/ganjanggejang/node/commit/990aefdf5662b2181ce47c5009b301c2bfbceae6
aduh95https://github.com/aduh95
on Sep 27, 2026https://github.com/nodejs/node/issues/41641#event-31936995396
lib: fix stream loading bug in node:benchhttps://github.com/nodejs/node/commit/a88c0d378beb15f82053e20e2c47c4ae94c68656
a88c0d3https://github.com/nodejs/node/commit/a88c0d378beb15f82053e20e2c47c4ae94c68656
HoonDongKanghttps://github.com/HoonDongKang
on Sep 28, 2026https://github.com/nodejs/node/issues/41641#event-31971103968
perf_hooks: allow RecordableHistogram to record 0https://github.com/HoonDongKang/node/commit/6d5a166d13707e604083e55c9f958d39efc60f60
6d5a166https://github.com/HoonDongKang/node/commit/6d5a166d13707e604083e55c9f958d39efc60f60
lib: fix stream loading bug in node:benchhttps://github.com/HoonDongKang/node/commit/99f7d3ebf0ecc229db8fbcfd5f8171f1f7b57fdf
99f7d3ehttps://github.com/HoonDongKang/node/commit/99f7d3ebf0ecc229db8fbcfd5f8171f1f7b57fdf
aduh95https://github.com/aduh95
on Sep 28, 2026https://github.com/nodejs/node/issues/41641#event-32031887178
lib: fix stream loading bug in node:benchhttps://github.com/nodejs/node/commit/37b3db91eb0bc724a519ff1700f5a27117076553
37b3db9https://github.com/nodejs/node/commit/37b3db91eb0bc724a519ff1700f5a27117076553
perf_hooks: allow RecordableHistogram to record 0https://github.com/nodejs/node/commit/c5ecbbb40fb2c7bdd1e4f2dc7f3907ecf6166aa3
c5ecbbbhttps://github.com/nodejs/node/commit/c5ecbbb40fb2c7bdd1e4f2dc7f3907ecf6166aa3
perf_hooks: allow RecordableHistogram to record 0https://github.com/nodejs/node/commit/ee126e37e8c0254959864b8fb346cf4b8421470a
ee126e3https://github.com/nodejs/node/commit/ee126e37e8c0254959864b8fb346cf4b8421470a
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/41641
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/41641
perf_hooksIssues and PRs related to the perf_hooks module and performance measurement APIs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22perf_hooks%22
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.