Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
dc293df0
Commit
dc293df0
authored
Feb 11, 2026
by
Jimmy Lai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bench(render-pipeline): default full runs to capture cpu profiles
parent
7c60a8ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
BENCHMARKING.md
bench/BENCHMARKING.md
+1
-1
README.md
bench/render-pipeline/README.md
+3
-1
analyze-profiles.ts
bench/render-pipeline/analyze-profiles.ts
+6
-1
benchmark.ts
bench/render-pipeline/benchmark.ts
+4
-2
No files found.
bench/BENCHMARKING.md
View file @
dc293df0
...
...
@@ -18,6 +18,7 @@ pnpm --filter=next build
## 2. End-to-end benchmark (full app render path)
This measures the full request path (
`renderToHTMLOrFlight`
) through
`bench/next-minimal-server`
.
In
`scenario=full`
and
`scenario=all`
,
`--capture-cpu`
defaults to
`true`
.
Node streams only:
...
...
@@ -117,7 +118,6 @@ pnpm bench:render-pipeline \
--scenario
=
full
\
--stream-mode
=
node
\
--build-full
=
true
\
--capture-cpu
=
true
\
--capture-trace
=
true
\
--capture-next-trace
=
true
\
--json-out
=
bench/render-pipeline/artifacts/<run>/results.json
\
...
...
bench/render-pipeline/README.md
View file @
dc293df0
...
...
@@ -16,6 +16,9 @@ Run end-to-end benchmark (default stress routes):
pnpm bench:render-pipeline
--scenario
=
full
--stream-mode
=
both
```
For
`scenario=full`
and
`scenario=all`
, CPU profiles are captured by default.
Disable with
`--capture-cpu=false`
if you want lower-overhead runs.
Skip rebuild for faster iteration (after you already built once):
```
bash
...
...
@@ -39,7 +42,6 @@ Capture CPU profiles + Node trace events + Next trace logs:
pnpm bench:render-pipeline
\
--scenario
=
full
\
--stream-mode
=
both
\
--capture-cpu
=
true
\
--capture-trace
=
true
\
--capture-next-trace
=
true
```
...
...
bench/render-pipeline/analyze-profiles.ts
View file @
dc293df0
...
...
@@ -378,7 +378,12 @@ async function main() {
if
(
!
webAnalysis
&&
!
nodeAnalysis
)
{
console
.
log
(
'
\
nNo CPU profiles found in this artifact run.'
)
console
.
log
(
'Run benchmark with --capture-cpu=true first.'
)
console
.
log
(
'This analyzer reads only <mode>/<mode>.cpuprofile artifacts (not trace-event JSON or next-runtime-trace.log).'
)
console
.
log
(
'Run benchmark with --capture-cpu=true, e.g. pnpm bench:render-pipeline --scenario=full --stream-mode=node --capture-cpu=true'
)
return
}
...
...
bench/render-pipeline/benchmark.ts
View file @
dc293df0
...
...
@@ -174,7 +174,7 @@ Full benchmark options:
--timeout-ms=<number> (default: 30000)
Profiling and trace options:
--capture-cpu=true|false (default:
false
)
--capture-cpu=true|false (default:
true for scenario=full|all, false for scenario=micro
)
--capture-heap=true|false (default: false)
--capture-trace=true|false (default: false)
--capture-next-trace=true|false (default: true)
...
...
@@ -247,6 +247,8 @@ function parseCli(): CliOptions {
const
routes
=
parseRoutes
(
args
.
get
(
'routes'
))
const
buildFull
=
parseBoolean
(
args
.
get
(
'build-full'
)
??
'true'
)
const
defaultCaptureCpu
=
scenarioRaw
===
'full'
||
scenarioRaw
===
'all'
?
'true'
:
'false'
const
shouldForceBuildFull
=
(
scenarioRaw
===
'full'
||
scenarioRaw
===
'all'
)
&&
streamModeRaw
===
'both'
&&
...
...
@@ -273,7 +275,7 @@ function parseCli(): CliOptions {
timeoutMs
:
parseNumberArg
(
args
,
'timeout-ms'
,
30
_000
),
port
:
parseNumberArg
(
args
,
'port'
,
3199
),
captureCpu
:
parseBoolean
(
args
.
get
(
'capture-cpu'
)
??
'false'
),
captureCpu
:
parseBoolean
(
args
.
get
(
'capture-cpu'
)
??
defaultCaptureCpu
),
captureHeap
:
parseBoolean
(
args
.
get
(
'capture-heap'
)
??
'false'
),
captureTrace
:
parseBoolean
(
args
.
get
(
'capture-trace'
)
??
'false'
),
captureNextTrace
:
parseBoolean
(
args
.
get
(
'capture-next-trace'
)
??
'true'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment