This is a ESM benchmark, rewrite it so that we are directly
benchmarking the ESM import.meta paths and using number of
loads for op/s calculation, instead of doing it in startup
benchmarks and nesting number of process/workers spawn
for op/s calculation.
PR-URL: https://github.com/nodejs/node/pull/50683
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
It's now runtime-deprecated. Remove it from the benchmark. This
also gets rid of the warning emitted when the fixture is loaded.
PR-URL: https://github.com/nodejs/node/pull/50689
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Also remove the require-cachable.js benchmarks because now all builtin
modules are cacheable, it would be comparing oranges to apples when
we try to compare the performance of loading all cacheable modules
in different Node.js binaries since the set of modules are just
different. Comparison of startup performance that involves loading
of the long-standing, stable builtins is already covered by the
require-builtins benchmark.
PR-URL: https://github.com/nodejs/node/pull/45746
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This allows the misc/startup benchmark to run again
after the renaming of the C++ `native_module` to `builtins`
PR-URL: https://github.com/nodejs/node/pull/44727
Refs: https://github.com/nodejs/node/pull/44135
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
The source context is not prepended to the value of the `stack` property
when the source map is not enabled. Rather than prepending the error
source context to the value of the `stack` property unconditionally,
this patch aligns the behavior and only prints the source context when
the error is not handled by userland (e.g. fatal errors).
Also, this patch fixes that when source-map support is enabled, the
error source context is not pointing to where the error was thrown.
PR-URL: https://github.com/nodejs/node/pull/43875
Fixes: https://github.com/nodejs/node/issues/43186
Fixes: https://github.com/nodejs/node/issues/41541
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/36972
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Adds a simple benchmark for https server based on the http simple
benchmark. Updates benchmarker integration for autocannon and wrk,
so that they support https scheme.
Also adds a new HTTPS section and improves HTTP/2 section in
the benchmark guide.
PR-URL: https://github.com/nodejs/node/pull/36612
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
`inspector` and `trace_events` will throw errors if Node.js has been
compiled with `--without-intl`.
Refs: https://github.com/nodejs/node/pull/35816
PR-URL: https://github.com/nodejs/node/pull/35968
Fixes: https://github.com/nodejs/node/issues/35962
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Adding a new benchmark for testing the performance of loading
available public modules.
PR-URL: https://github.com/nodejs/node/pull/35816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Use let and const in domain, es, events, fixtures, fs, http,
http2 and misc.
PR-URL: https://github.com/nodejs/node/pull/31518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This allows us to query the categories of modules in C++
so we can implement the code cache generator in C++ that
does not depend on a Node.js binary.
PR-URL: https://github.com/nodejs/node/pull/27046
Refs: https://github.com/nodejs/node/issues/21563
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Code in benchmark directory sometimes uses `function () {}` for
anonymous callbacks and sometimes uses `() => {}`. Multi-line arrays
sometimes have a trailing comma and sometimes do not. Update to always
use arrow functions for anonymous callbacks and trailing commas for
multiline arrays.
PR-URL: https://github.com/nodejs/node/pull/25944
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This patch:
- Introduces `common.bakeUrlData` which can be used to pre-generate
the data set for the URL benchmarks to loop through instead of
looping over a constant.
- Add the option to use WPT data in benchmarks for better diversity
in the input
- Add the option to benchmark URL parsing with base URLs (whatwg only)
- Moves the data in `benchmark/fixtures/url-inputs.js` to
`benchmark/common.js`
PR-URL: https://github.com/nodejs/node/pull/24302
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
1. Add options to benchmark the startup performance of a node
"instance" after running a script. By default there are two options:
`test/fixtures/semicolon` which is basically an empty file,
and `benchmark/fixtures/require-cachable` which require all
the cachable modules before exiting. This allows us to measure
the overhead of bootstrap in more scenarios.
2. Add options to benchmark the overhead of spinning
node through a process and through a worker.
PR-URL: https://github.com/nodejs/node/pull/24220
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
autocannon appears to have trouble recognizing URLs that contain true
or false within them. Use 0 or 1 instead to represent the same.
PR-URL: https://github.com/nodejs/node/pull/17583
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/11264
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Adds the string search implementation from v8
which uses naive search if pattern length < 8
or to a specific badness then uses Boyer-Moore-Horspool
Added benchmark shows the expected improvements
Added option to use ucs2 encoding with Buffer::IndexOf
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2539