Skip to content

Add Live Debugger runtime benchmark coverage - #429

Open
watson wants to merge 2 commits into
masterfrom
watson/DEBUG-5787/add-bench
Open

Add Live Debugger runtime benchmark coverage#429
watson wants to merge 2 commits into
masterfrom
watson/DEBUG-5787/add-bench

Conversation

@watson

@watson watson commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What and why?

This adds repeatable browser runtime benchmark coverage for dormant Live Debugger instrumentation. The goal is to give Live Debugger browser changes a controlled way to track whether instrumentation changes introduce measurable overhead in real browsers.

How?

Adds a Playwright benchmark under packages/tests/src/bench/liveDebuggerRuntime with Tiny and Hot workload shapes, baseline/control/instrumented variants, and SDK-like dormant probe hooks installed in the page.

Adds a custom reporter that computes conservative per-call overhead bounds, 95% confidence intervals, A/A diagnostics, moving-block bootstrap intervals, autocorrelation diagnostics, browser failures, raw JSON output, and a PR comment body.

Adds yarn workspace @dd/tests bench:live-debugger:runtime, a dedicated Playwright config, result artifacts, a non-blocking CI job, a shared Playwright setup action, and Live Debugger contributor docs explaining how to run and interpret the benchmark.

For more details, see the "Runtime benchmark" section in the added CONTRIBUTING.md file in this PR.

Validation

The benchmark runs in CI as a non-blocking job and uploads raw samples plus the generated report artifacts for review.

Benchmark note

The current benchmark numbers show a significant dormant-instrumentation overhead in Safari. Most of this is fixed in stacked PR #438.

watson commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Live Debugger Runtime Benchmark

SDK-loaded dormant-probe runtime overhead, measured against an uninstrumented bundle in the same browser session.

Browser Workload Quality Per-call overhead upper
chrome Hot clean <= 3.38 ns
chrome Tiny clean <= 0.28 ns
firefox Hot clean <= 7.70 ns
firefox Tiny clean <= 0.27 ns
safari Hot clean <= 13.85 ns
safari Tiny clean <= 12.99 ns
Full diagnostics
browser  workload  quality  per-call overhead upper  overhead upper           95% CI        A/A diag         block CI  acf(1)   baseline  instrumented                         samples
-------  --------  -------  -----------------------  --------------  ---------------  --------------  ---------------  ------  ---------  ------------  ------------------------------
chrome   Hot       clean                 <= 3.38 ns        <= 7.82%    3.37..3.38 ns  -0.01..0.01 ns    3.37..3.38 ns   -0.06  51.250 ms     55.255 ms  102 (trim 20%, outliers 11.8%)
chrome   Tiny      clean                 <= 0.28 ns        <= 4.40%    0.23..0.28 ns  -0.01..0.06 ns    0.20..0.28 ns    0.06  53.010 ms     55.140 ms  102 (trim 20%, outliers 18.6%)
firefox  Hot       clean                 <= 7.70 ns       <= 36.15%    7.68..7.70 ns  -0.00..0.01 ns    7.68..7.69 ns    0.02  40.660 ms     55.360 ms  102 (trim 20%, outliers 15.7%)
firefox  Tiny      clean                 <= 0.27 ns        <= 2.27%    0.27..0.27 ns  -0.00..0.00 ns    0.27..0.27 ns    0.08  58.940 ms     60.280 ms   102 (trim 20%, outliers 7.8%)
safari   Hot       clean                <= 13.85 ns       <= 65.86%  13.63..13.80 ns  -0.00..0.00 ns  13.59..13.85 ns    0.02  32.980 ms     54.520 ms   102 (trim 20%, outliers 2.0%)
safari   Tiny      clean                <= 12.99 ns      <= 396.82%  12.74..12.92 ns  -0.00..0.00 ns  12.65..12.99 ns    0.23  12.000 ms     59.170 ms   102 (trim 20%, outliers 2.9%)

Raw samples are in the live-debugger-runtime-bench-results artifact.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 22, 2026

Copy link
Copy Markdown

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f3cc0fe | Docs | View more details | Give us feedback!

@watson
watson force-pushed the watson/DEBUG-5787/add-bench branch 5 times, most recently from 3a9f3d6 to 1296572 Compare June 24, 2026 16:05
@watson
watson marked this pull request as ready for review June 24, 2026 16:17
@watson
watson requested review from a team as code owners June 24, 2026 16:17
@watson
watson force-pushed the watson/DEBUG-5787/add-bench branch 2 times, most recently from d80cc4f to ba9d257 Compare June 26, 2026 11:49
@watson
watson force-pushed the watson/DEBUG-5787/add-bench branch from ba9d257 to 0168305 Compare July 1, 2026 13:03
The browser Live Debugger instrumentation needs repeatable runtime overhead
checks before transform changes land.

Add an opt-in Playwright benchmark that compares baseline, control, and
instrumented workloads in the same browser session with dormant probe hooks
installed. Report conservative per-call overhead bounds with confidence
intervals, A/A diagnostics, block bootstrap checks, and PR comment output.

Wire the benchmark into CI as a non-blocking job, share Playwright setup between
jobs, upload raw samples as artifacts, and document how contributors should run
and interpret the benchmark.
@watson
watson force-pushed the watson/DEBUG-5787/add-bench branch from 0168305 to 0de9917 Compare August 26, 2026 11:15
Grow near-target batches proportionally and lock the behavior down with a deterministic test.

Co-authored-by: Cursor <cursoragent@cursor.com>

@tylfin tylfin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'll defer the CI changes and test configuration to the build-plugins team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants