bench: calibrate new ssr benchmarks iteration to reduce variability#7625
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR centralizes and increases per-scenario benchmark iteration counts across SSR scenarios, replaces shared loop option objects with per-scenario constants, and changes bench-utils to validate using the Response and asynchronously drain response bodies. ChangesBenchmark Iteration Parameterization
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 7def91e
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview3 package(s) bumped directly, 10 bumped as dependents. 🟩 Patch bumps
|
Bundle Size Benchmarks
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
Merging this PR will degrade performance by 45.01%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | ssr server-fn raw-stream (react) |
125 ms | 106.4 ms | +17.46% |
| ⚡ | Simulation | ssr server-fn raw-stream (solid) |
130.7 ms | 111.7 ms | +17% |
| ⚡ | Simulation | ssr server-fn raw-stream (vue) |
128.4 ms | 110.5 ms | +16.26% |
| 👁 | Simulation | ssr not-found (vue) |
73.3 ms | 168.8 ms | -56.57% |
| 👁 | Simulation | ssr head (vue) |
147 ms | 324.9 ms | -54.75% |
| 👁 | Simulation | ssr loaders (vue) |
94.4 ms | 136.7 ms | -30.94% |
| 👁 | Simulation | ssr selective (vue) |
72 ms | 139.8 ms | -48.48% |
| 👁 | Simulation | ssr server-fn POST (vue) |
49.6 ms | 71.4 ms | -30.43% |
| 👁 | Simulation | ssr server-route middleware (vue) |
44.8 ms | 63.2 ms | -29.25% |
| 👁 | Simulation | ssr server-route (vue) |
33.6 ms | 60.7 ms | -44.56% |
| 👁 | Simulation | ssr assets inline-css cdn (vue) |
82.3 ms | 187.6 ms | -56.1% |
| 👁 | Simulation | ssr assets linked-css control (vue) |
72 ms | 214.5 ms | -66.43% |
| 👁 | Simulation | ssr before-load chain (vue) |
127.3 ms | 183.8 ms | -30.72% |
| 👁 | Simulation | ssr control-flow error 500 (vue) |
92.9 ms | 198.1 ms | -53.13% |
| 👁 | Simulation | ssr control-flow route headers (vue) |
88.6 ms | 213.4 ms | -58.51% |
| 👁 | Simulation | ssr control-flow unmatched 404 (vue) |
128.5 ms | 190.1 ms | -32.39% |
| 👁 | Simulation | ssr global-mw document (vue) |
92.4 ms | 221 ms | -58.18% |
| 👁 | Simulation | ssr global-mw server-fn (vue) |
48.8 ms | 59.9 ms | -18.65% |
| 👁 | Simulation | ssr global-mw server-route (vue) |
29.6 ms | 71.6 ms | -58.6% |
| 👁 | Simulation | ssr rewrite localized (vue) |
80.1 ms | 177.3 ms | -54.85% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing perf-ssr-calibrate-iterations (7def91e) with main (a2b9d51)
increase iteration count in new SSR benchmarks for all those that were running in under 50ms. The goal is to improve the signal to noise ratio, and reduce variability in the results.
I'm not sure this is the solution, but I also think it can't hurt. CodSpeed has been very stable for us so far.
Also, improve response drain, from
response.text()to a.getReader()that ignores all chunks.Summary by CodeRabbit