Skip to content

test: enable trace_events tests with perfetto - #66068

Open
legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:test-perfetto
Open

legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:test-perfetto

Conversation

@legendecas

@legendecas legendecas commented Sep 16, 2026

Copy link
Copy Markdown
Member

Use https://perfetto.dev/docs/reference/trace-processor-cli to
convert the perfetto binary trace files to JSON files in tests
to verify that the traces are correctly exported with perfetto.

This moves the trace_events test suite to a dedicated test
folder test/trace_events as they depend on an external tool
trace_processor_shell. Added a make trace_processor to
download the expected version of trace_processor_shell
from perfetto releases.

This also unified the test assertions so that a test can
verify both legacy traces and perfetto traces.

Refs: #65794 (comment)

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. labels Sep 16, 2026
@legendecas legendecas added the trace_events Issues and PRs related to trace events from V8, Node.js core, and user code. label Sep 16, 2026
@legendecas
legendecas force-pushed the test-perfetto branch 5 times, most recently from 1f5ce76 to 9ace27c Compare September 16, 2026 15:37
@richardlau

Copy link
Copy Markdown
Member

This moves the trace_events test suite to a dedicated test folder test/trace_events as they depend on an external tool trace_processor_shell. Added a make trace_processor to download the expected version of trace_processor_shell from perfetto releases.

I think this (the download bit) will cause issues for downstream rebuilders cc @nodejs/distros.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.26%. Comparing base (efc612d) to head (126bad1).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66068      +/-   ##
==========================================
+ Coverage   90.23%   90.26%   +0.03%     
==========================================
  Files         789      789              
  Lines      270613   271482     +869     
  Branches    51794    51816      +22     
==========================================
+ Hits       244178   245058     +880     
+ Misses      16916    16887      -29     
- Partials     9519     9537      +18     

see 44 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.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. trace_events Issues and PRs related to trace events from V8, Node.js core, and user code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants