Skip to content

Conversation

@brunocroh
Copy link
Member

Description

This PR introduces the usage of a new environment variable NODE_RUN_ALL_BENCH_TESTS, which can be set to run all benchmark configurations in tests to cover more scenarios where benchmarks might fail.

Add more context to docs about how to write benchmark tests

and provides more details about the environment variables:

  • NODE_RUN_ALL_BENCH_TESTS
  • NODEJS_BENCHMARK_ZERO_ALLOWED

Benchmark tests were added for the following groups:

  • abort_controller
  • error
  • https
  • perf_hooks
  • permission
  • sqlite
  • test_runner
  • websocket

Additionally, some inconsistent test files were renamed:

  • test/benchmark/test-benchmark-async-hooks.js → test/benchmark/test-benchmark-async_hooks.js
  • test/benchmark/test-benchmark-child-process.js → test/benchmark/test-benchmark-child_process.js

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 17, 2025
@brunocroh
Copy link
Member Author

@RafaelGSS I think the requirements for adding the new workflow are covered here, but I'll probably need some guidance on creating the workflow itself. Let me know if I've missed anything here.

@brunocroh brunocroh force-pushed the benchmark/add-workflow-to-test-all-configs branch from b05e911 to f560cd7 Compare September 17, 2025 23:17
@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (97e55f8) to head (14f0ef7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59919      +/-   ##
==========================================
- Coverage   88.27%   88.25%   -0.02%     
==========================================
  Files         703      703              
  Lines      207333   207333              
  Branches    39875    39876       +1     
==========================================
- Hits       183028   182990      -38     
- Misses      16263    16301      +38     
  Partials     8042     8042              

see 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The env NODE_RUN_ALL_BENCH_TESTS was introduced
to enable benchmark tests to run all configs when it is passed.

Some tests that have file names different from the original benchmark
were using dashes in places that needed underscores and have been
renamed.

Some benchmarks that did not have tests were created. These are:

- test/benchmark/test-benchmark-abort_controller.js
- test/benchmark/test-benchmark-error.js
- test/benchmark/test-benchmark-https.js
- test/benchmark/test-benchmark-perf_hooks.js
- test/benchmark/test-benchmark-permission.js
- test/benchmark/test-benchmark-sqlite.js
- test/benchmark/test-benchmark-test_runner.js
- test/benchmark/test-benchmark-webstorage.js
@brunocroh brunocroh force-pushed the benchmark/add-workflow-to-test-all-configs branch from 137a84d to 14f0ef7 Compare September 18, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants