Skip to content

perf_hooks: reduce overhead of new user timings

Continuing the work started on https://github.com/nodejs/performance/issues/109.

This PR should be landed after https://github.com/nodejs/node/pull/49837.

                                                    confidence improvement accuracy (*)    (**)   (***)
perf_hooks/usertiming.js observe='all' n=100000            ***    351.28 %       ±9.79% ±13.17% ±17.46%
perf_hooks/usertiming.js observe='measure' n=100000        ***    436.41 %       ±8.94% ±12.03% ±15.93%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 2 comparisons, you can thus
expect the following amount of false-positive results:
  0.10 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.02 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

I will use the changes on the latest PR to keep this even simpler, so I will keep as draft for now.

cc @nodejs/performance

Merge request reports

Loading