node/benchmark
Guilherme Araújo 096095b127
benchmark: add SQLite benchmarks
PR-URL: https://github.com/nodejs/node/pull/61401
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-02-24 08:39:00 +01:00
..
abort_controller
assert assert,util: fix constructor lookup in deep equal comparison 2025-05-19 12:14:08 +02:00
async_hooks lib: rewrite AsyncLocalStorage without async_hooks 2024-08-14 08:14:49 +02:00
blob
buffers benchmark: fix incorrect base64 input in byteLength benchmark 2026-02-24 00:37:03 +01:00
child_process
cluster benchmark: calibrate config cluster/echo.js 2025-10-07 17:29:34 +02:00
console console: optimize single-string logging 2026-02-24 00:36:28 +01:00
crypto benchmark: use boolean options in benchmark tests 2026-02-24 00:37:10 +01:00
dgram benchmark: update num to n in dgram offset-length 2025-10-22 23:43:53 +02:00
diagnostics_channel benchmark: reduce N for diagnostics_channel subscribe benchmark 2025-08-04 13:35:50 +02:00
dns
domain
error
es benchmark: remove deprecated _extend from benchmark 2025-08-26 11:22:42 +02:00
esm benchmark: use typescript for import cjs benchmark 2026-02-24 00:36:55 +01:00
events events: optimize EventTarget.addEventListener 2024-11-27 01:23:18 -05:00
fixtures benchmark: focus on import.meta intialization in import-meta benchmark 2026-02-24 00:36:43 +01:00
fs benchmark: reduce readfile-permission-enabled config 2025-09-20 06:10:33 +00:00
http benchmark, test: replace CRLF variable with string literal 2025-09-20 04:32:34 +00:00
http2
https
internal lib,src: isInsideNodeModules should test on the first non-internal frame 2026-02-17 15:14:07 +01:00
mime
misc benchmark: drop misc/punycode benchmark 2025-08-04 13:35:55 +02:00
module benchmark: add per-suite setup option 2026-02-24 00:36:41 +01:00
napi node-api: use Node-API in comments 2026-02-24 08:38:56 +01:00
net
os os: improve tmpdir performance 2024-09-14 00:20:35 +02:00
path path: improve path.resolve() performance when used as process.cwd() 2025-06-10 17:03:16 +02:00
perf_hooks lib: prefer logical assignment 2024-11-27 11:03:39 -05:00
permission benchmark: update count to n in permission startup 2025-10-22 23:43:53 +02:00
process
querystring
readline
source_map benchmark: add source map and source map cache 2025-07-27 20:28:13 +02:00
sqlite benchmark: add SQLite benchmarks 2026-02-24 08:39:00 +01:00
streams benchmark: add stream.compose benchmark 2024-08-14 08:37:02 +02:00
string_decoder benchmark: adjust configuration for string-decoder bench 2025-08-04 13:35:56 +02:00
test_runner test_runner: run single test file benchmark 2025-02-03 20:09:56 +01:00
timers
tls
ts module: unflag --experimental-strip-types 2025-07-15 19:03:11 -03:00
url url: remove array.reduce usage 2026-02-24 00:37:00 +01:00
util benchmark: use boolean options in benchmark tests 2026-02-24 00:37:10 +01:00
v8 benchmark: calibrate config v8/serialize.js 2025-09-20 06:10:40 +00:00
validators
vm benchmark: add benchmark for leaf source text modules 2026-02-19 18:46:01 +01:00
websocket
webstorage benchmark: add webstorage benchmark 2024-10-04 10:20:21 +02:00
webstreams
worker
zlib zlib: add zstd support 2025-04-16 03:29:16 -03:00
_benchmark_progress.js
_cli.js benchmark: small lint fix on _cli.js 2025-08-04 13:35:55 +02:00
_cli.R
_http-benchmarkers.js lib: prefer logical assignment 2024-11-27 11:03:39 -05:00
_test-double-benchmarker.js
bar.R
calibrate-n.js benchmark: add calibrate-n script 2025-08-26 11:22:34 +02:00
common.js benchmark: allow boolean option values 2026-02-24 00:37:10 +01:00
compare.js
compare.R
cpu.sh benchmark: improve cpu.sh for safety and usability 2026-02-19 18:46:22 +01:00
eslint.config_partial.mjs tools: import rather than require ESLint plugins 2025-04-17 10:51:27 -03:00
README.md benchmark,doc: mention bar.R to the list of scripts 2024-09-12 11:06:40 +02:00
run.js benchmark: add --track to benchmark 2025-08-04 13:35:55 +02:00
scatter.js
scatter.R

Node.js Core Benchmarks

This folder contains code and data used to measure performance of different Node.js implementations and different ways of writing JavaScript run by the built-in JavaScript engine.

For a detailed guide on how to write and run benchmarks in this directory, see the guide on benchmarks.

Table of Contents

File tree structure

Directories

Benchmarks testing the performance of a single node submodule are placed into a directory with the corresponding name, so that they can be executed by submodule or individually. Benchmarks that span multiple submodules may either be placed into the misc directory or into a directory named after the feature they benchmark. E.g. benchmarks for various new ECMAScript features and their pre-ES2015 counterparts are placed in a directory named es. Fixtures that are not specific to a certain benchmark but can be reused throughout the benchmark suite should be placed in the fixtures directory.

Other Top-level files

The top-level files include common dependencies of the benchmarks and the tools for launching benchmarks and visualizing their output. The actual benchmark scripts should be placed in their corresponding directories.

  • _benchmark_progress.js: implements the progress bar displayed when running compare.js
  • _cli.js: parses the command line arguments passed to compare.js, run.js and scatter.js
  • _cli.R: parses the command line arguments passed to compare.R
  • _http-benchmarkers.js: selects and runs external tools for benchmarking the http subsystem.
  • bar.R: R script for visualizing the output of benchmarks with bar plots.
  • common.js: see Common API.
  • compare.js: command line tool for comparing performance between different Node.js binaries.
  • compare.R: R script for statistically analyzing the output of compare.js
  • run.js: command line tool for running individual benchmark suite(s).
  • scatter.js: command line tool for comparing the performance between different parameters in benchmark configurations, for example to analyze the time complexity.
  • scatter.R: R script for visualizing the output of scatter.js with scatter plots.

Common API

The common.js module is used by benchmarks for consistency across repeated tasks. It has a number of helpful functions and properties to help with writing benchmarks.

createBenchmark(fn, configs[, options])

See the guide on writing benchmarks.

default_http_benchmarker

The default benchmarker used to run HTTP benchmarks. See the guide on writing HTTP benchmarks.

PORT

The default port used to run HTTP benchmarks. See the guide on writing HTTP benchmarks.

sendResult(data)

Used in special benchmarks that can't use createBenchmark and the object it returns to accomplish what they need. This function reports timing data to the parent process (usually created by running compare.js, run.js or scatter.js).