perf_hooks: return different functions in timerify#42854
perf_hooks: return different functions in timerify#42854himself65 wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Review requested:
|
4762978 to
123fa0c
Compare
|
I'm thinking to remove the cache feature.
For example: const perf_hooks = require('perf_hooks')
function f () {
console.log('hello, world!')
}
Object.freeze(f)
perf_hooks.performance.timerify(f)/Users/himself65/Code/node/out/Debug/node /Users/himself65/Code/test/index.js
node:internal/perf/timerify:123
ObjectDefineProperties(fn, {
^
TypeError: Cannot define property Symbol(kTimerified), object is not extensible
at defineProperties (<anonymous>)
at Performance.timerify (node:internal/perf/timerify:123:5)
The original PR(#37136) only has 1 parameter which is Moreover, I think users could cache a timerify function if they want. So I will remove cache stuff in this PR /cc @nodejs/performance |
46444e2 to
f87aed8
Compare
|
quashed |
f87aed8 to
f9bc9ee
Compare
f9bc9ee to
81bbb09
Compare
Commit Queue failed- Loading data for nodejs/node/pull/42854 ✔ Done loading data for nodejs/node/pull/42854 ----------------------------------- PR info ------------------------------------ Title perf_hooks: return different timerified function in timerify (#42854) Author Himself65 (@Himself65) Branch Himself65:20220423-fix-perfomance-timerify -> nodejs:master Labels author ready, perf_hooks, needs-ci Commits 1 - perf_hooks: return different timerified function in timerify Committers 1 - Himself65 PR-URL: https://github.com/nodejs/node/pull/42854 Fixes: https://github.com/nodejs/node/issues/42742 Reviewed-By: Matteo Collina Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/42854 Fixes: https://github.com/nodejs/node/issues/42742 Reviewed-By: Matteo Collina Reviewed-By: James M Snell -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - perf_hooks: return different timerified function in timerify ℹ This PR was created on Sun, 24 Apr 2022 22:39:46 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/42854#pullrequestreview-955517509 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/42854#pullrequestreview-955519178 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-04-30T22:10:34Z: https://ci.nodejs.org/job/node-test-pull-request/43800/ - Querying data for job/node-test-pull-request/43800/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2254578403 |
|
Let me think... How to use commit-queie🤔 |
Commit Queue failed- Loading data for nodejs/node/pull/42854 ✔ Done loading data for nodejs/node/pull/42854 ----------------------------------- PR info ------------------------------------ Title perf_hooks: return different timerified function in timerify (#42854) Author Himself65 (@Himself65) Branch Himself65:20220423-fix-perfomance-timerify -> nodejs:master Labels author ready, perf_hooks, needs-ci Commits 1 - perf_hooks: return different timerified function in timerify Committers 1 - Himself65 PR-URL: https://github.com/nodejs/node/pull/42854 Fixes: https://github.com/nodejs/node/issues/42742 Reviewed-By: Matteo Collina Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/42854 Fixes: https://github.com/nodejs/node/issues/42742 Reviewed-By: Matteo Collina Reviewed-By: James M Snell -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - perf_hooks: return different timerified function in timerify ℹ This PR was created on Sun, 24 Apr 2022 22:39:46 GMT ✔ Approvals: 2 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/42854#pullrequestreview-955517509 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/42854#pullrequestreview-955519178 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-05-01T19:21:48Z: https://ci.nodejs.org/job/node-test-pull-request/43800/ - Querying data for job/node-test-pull-request/43800/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2254620326 |
|
Landed in 3d0fc13 |
|
What's more, I found that the commit queue always failed because the commit message tool didn't consider the |
Fixes: nodejs/node#42742 PR-URL: nodejs/node#42854 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Co-authored-by: HE Shi-Jun <hax@heshijun.net>
Fixes: #42742