Skip to content

[RUM-12600] Continuous Benchmarking#3927

Merged
amortemousque merged 7 commits intomainfrom
aymeric/profiling-benchmark
Nov 18, 2025
Merged

[RUM-12600] Continuous Benchmarking#3927
amortemousque merged 7 commits intomainfrom
aymeric/profiling-benchmark

Conversation

@amortemousque
Copy link
Collaborator

@amortemousque amortemousque commented Oct 23, 2025

Motivation

We want to monitor the impact of performance-intensive features like Replay and Profiling.
This PR introduces benchmark tests to measure their effect.

Measurements

Scenarios

Run two scenarios on two applications:

  • React Heavy SPA: Emulating a observability app cpu intensive, Web Vitals in the "Good" score range.
  • React Shopist Like: Lightweight E-Commerce App, targeting Web Vitals in the "Needs improvement" score range.

This scenario runs under four different configurations:

  • none: no SDK
  • none_with_header: SDK disabled but profiling headers present
  • rum: RUM SDK only
  • rum_replay: RUM with Session Replay
  • rum_profiling: RUM with Profiling

Scheduling

A new performance-benchmark GitLab job runs every 30 minutes.
Each run executes the tests 15 times.

Visualization

Local: displays a summary table in the console
image

Datadog dashboard
image

Changes

  • add test/app/react-heavy-spa: app to benchmark test runs
  • add test/performance: Playwright performance benchmarks
  • move e2e/lib/framework/httpServer to test/lib for reuse in perf tests
  • add performance-benchmark CI job

I haven’t replaced /performances yet, but if we agree on this approach, I’ll remove it in a follow-up PR.

Test instructions

yarn test:performance

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@datadog-official
Copy link

datadog-official bot commented Oct 23, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 92.67% (+0.00%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9bac9cf | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch from f8d98a3 to 036f257 Compare October 23, 2025 13:47
@amortemousque amortemousque changed the title Continuous Benchmark Continuous Benchmarking Oct 23, 2025
@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Oct 23, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 164.05 KiB 164.05 KiB 0 B 0.00%
Rum Profiler 4.84 KiB 4.84 KiB 0 B 0.00%
Rum Recorder 19.50 KiB 19.50 KiB 0 B 0.00%
Logs 55.91 KiB 55.91 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 121.33 KiB 121.33 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.004 0.0046 +15.00%
RUM - add action 0.0114 0.0128 +12.28%
RUM - add error 0.0112 0.0116 +3.57%
RUM - add timing 0.0026 0.0027 +3.85%
RUM - start view 0.0031 0.0032 +3.23%
RUM - start/stop session replay recording 0.0007 0.0007 0.00%
Logs - log message 0.0132 0.0143 +8.33%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.77 KiB 25.80 KiB +32 B
RUM - add action 93.84 KiB 112.78 KiB +18.94 KiB
RUM - add timing 24.90 KiB 24.33 KiB -588 B
RUM - add error 98.13 KiB 116.38 KiB +18.25 KiB
RUM - start/stop session replay recording 24.66 KiB 23.83 KiB -849 B
RUM - start view 448.19 KiB 487.34 KiB +39.15 KiB
Logs - log message 42.73 KiB 43.23 KiB +513 B

🔗 RealWorld

Comment on lines +4 to +5
test.describe('benchmark', () => {
createBenchmarkTest('heavy').run(async (page, takeMeasurements) => {
Copy link
Member

Choose a reason for hiding this comment

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

💭 thought: ‏I think there are more idiomatic ways to declare common test logic in playwright using fixtures. But personally I don't mind your approach, as I find it more explicit than using playwright magic.

@amortemousque amortemousque changed the title Continuous Benchmarking [RUM-12600] Continuous Benchmarking Nov 4, 2025
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch 5 times, most recently from 4a7b425 to 9d4e4fb Compare November 10, 2025 11:20
@amortemousque amortemousque marked this pull request as ready for review November 10, 2025 11:35
@amortemousque amortemousque requested a review from a team as a code owner November 10, 2025 11:35
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch 3 times, most recently from 0fb5c4c to 915b4f4 Compare November 10, 2025 12:09
@amortemousque amortemousque requested a review from a team as a code owner November 12, 2025 15:20
Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

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

approved with some very minor suggestions!


### URL Parameters

Customize RUM configuration via URL params:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Customize RUM configuration via URL params:
Customize RUM configuration using the following URL params:

@@ -0,0 +1,196 @@
# Heavy SPA Benchmark - Datadog Web UI

A complex, JavaScript-heavy single-page application built with React + TypeScript for performance benchmarking of Datadog Browser SDK features.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A complex, JavaScript-heavy single-page application built with React + TypeScript for performance benchmarking of Datadog Browser SDK features.
This is a complex, JavaScript-heavy single-page application built with React + TypeScript for performance benchmarking the Datadog Browser SDK.

@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch 3 times, most recently from 1b817fa to f067ba4 Compare November 12, 2025 21:08
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch from f067ba4 to 7dbd90a Compare November 13, 2025 09:17
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch from 7dbd90a to 76bc292 Compare November 13, 2025 12:20
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch 2 times, most recently from eea3c61 to 73df52a Compare November 16, 2025 20:49
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch 3 times, most recently from 4eab6b5 to b909240 Compare November 17, 2025 09:39
@amortemousque amortemousque force-pushed the aymeric/profiling-benchmark branch from b909240 to d80a83a Compare November 17, 2025 09:40
@amortemousque amortemousque merged commit 86976f2 into main Nov 18, 2025
22 checks passed
@amortemousque amortemousque deleted the aymeric/profiling-benchmark branch November 18, 2025 08:56
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.

3 participants