Performance marks can carry details about the operation they describe. Small stable identifiers are easier to aggregate than large payloads.
Worked example
import {
performance,
createHistogram,
PerformanceObserver,
} from "node:perf_hooks";
console.log(performance.mark("load", { detail: { count: 2 } }).detail);Result
{ count: 2 }Implementation notes
Marks accumulate unless they are cleared or otherwise bounded. Long-running services should decide how much diagnostic history to retain.
Try it yourself
Record two marks with the same name and different request labels.
Open the Node.js example →Editorial date October 24, 2026 · Published December 6, 2026