You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split out of #6766 after PR #8229, which made timerify's histogram option real (timerify(fn, { histogram }) now validates the handle and records durations) but left five behaviours unimplemented. All five live in perf_timerify_wrapper / js_perf_timerify in crates/perry-runtime/src/perf_hooks.rs.
Reproduce with ./run_parity_tests.sh --suite node-suite --module perf_hooks.
1. Async settlement — the wrapper records at return, not at settle (2 cases)
Node defers the measurement until the returned promise settles. Perry records synchronously, so an async function's entry/sample lands one turn early.
Needs the wrapper to detect a thenable result and attach a native continuation that emits the entry (and records into the optional histogram) on settlement.
2. new through the wrapper (timerify/constructor)
classValue{marker=1}constWrapped=timerify(Value);newWrapped()// node: a Value instance, marker 1; perry: instance false, marker undefinedWrapped()// node: TypeError (class called without new); perry: "call ok"
3. Entry arguments (timerify/entry-arguments)
Node's function entry carries the call arguments both as entry.detail (an array) and as indexed properties on the entry itself:
Activity