node/benchmark/async_hooks
Anna Henningsen c4457d873f
benchmark: always throw the same Error instance
Stack trace capturing currently accounts for 40 % of the benchmark
running time. Always throwing the same exception object removes
that overhead and lets the benchmark be more focused on what it is
supposed to measure.

Refs: https://github.com/nodejs/node/pull/34512#issuecomment-663977271

PR-URL: https://github.com/nodejs/node/pull/34523
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-08-05 08:49:27 -07:00
..
async-resource-vs-destroy.js benchmark: fix async-resource benchmark 2020-06-30 09:34:02 -07:00
gc-tracking.js async_hooks: move to lazy destroy hook registration in AsyncResource 2020-04-07 16:30:17 +01:00
http-server.js benchmark: add test and all options and improve errors" 2020-03-09 22:35:53 +01:00
promises.js benchmark: always throw the same Error instance 2020-08-05 08:49:27 -07:00