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
3375e663
Unverified
Commit
3375e663
authored
Sep 27, 2021
by
Tim Neutkens
Committed by
GitHub
Sep 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional bench tracing improvements (#29325)
parent
7f998950
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
15 deletions
+39
-15
launch.json
.vscode/launch.json
+27
-9
.gitignore
bench/nested-deps/.gitignore
+1
-0
next.config.js
bench/nested-deps/next.config.js
+4
-0
package.json
bench/nested-deps/package.json
+4
-3
trace.ts
packages/next/trace/trace.ts
+3
-3
No files found.
.vscode/launch.json
View file @
3375e663
...
@@ -10,10 +10,13 @@
...
@@ -10,10 +10,13 @@
"request"
:
"launch"
,
"request"
:
"launch"
,
"cwd"
:
"${workspaceFolder}"
,
"cwd"
:
"${workspaceFolder}"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeArgs"
:
[
"run"
,
"debug"
,
"dev"
,
"
test/integration/basic
"
],
"runtimeArgs"
:
[
"run"
,
"debug"
,
"dev"
,
"
bench/nested-deps
"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
],
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
],
"port"
:
9229
"port"
:
9229
,
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
},
},
{
{
"name"
:
"Launch app build"
,
"name"
:
"Launch app build"
,
...
@@ -21,10 +24,13 @@
...
@@ -21,10 +24,13 @@
"request"
:
"launch"
,
"request"
:
"launch"
,
"cwd"
:
"${workspaceFolder}"
,
"cwd"
:
"${workspaceFolder}"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeArgs"
:
[
"run"
,
"debug"
,
"build"
,
"
test/integration/basic
"
],
"runtimeArgs"
:
[
"run"
,
"debug"
,
"build"
,
"
bench/nested-deps
"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"port"
:
9229
,
"port"
:
9229
,
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
]
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
],
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
},
},
{
{
"name"
:
"Launch app build trace jaeger"
,
"name"
:
"Launch app build trace jaeger"
,
...
@@ -35,7 +41,10 @@
...
@@ -35,7 +41,10 @@
"runtimeArgs"
:
[
"run"
,
"clean-trace-jaeger"
],
"runtimeArgs"
:
[
"run"
,
"clean-trace-jaeger"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"port"
:
9229
,
"port"
:
9229
,
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
]
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
],
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
},
},
{
{
"name"
:
"Launch app production"
,
"name"
:
"Launch app production"
,
...
@@ -43,9 +52,12 @@
...
@@ -43,9 +52,12 @@
"request"
:
"launch"
,
"request"
:
"launch"
,
"cwd"
:
"${workspaceFolder}"
,
"cwd"
:
"${workspaceFolder}"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeArgs"
:
[
"run"
,
"debug"
,
"start"
,
"
test/integration/basic
"
],
"runtimeArgs"
:
[
"run"
,
"debug"
,
"start"
,
"
bench/nested-deps
"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"port"
:
9229
"port"
:
9229
,
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
},
},
{
{
"type"
:
"node"
,
"type"
:
"node"
,
...
@@ -53,7 +65,10 @@
...
@@ -53,7 +65,10 @@
"name"
:
"Attach to existing debugger"
,
"name"
:
"Attach to existing debugger"
,
"port"
:
9229
,
"port"
:
9229
,
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
]
"outFiles"
:
[
"${workspaceFolder}/packages/next/dist/**/*"
],
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
},
},
{
{
"name"
:
"Launch this example"
,
"name"
:
"Launch this example"
,
...
@@ -63,7 +78,10 @@
...
@@ -63,7 +78,10 @@
"runtimeExecutable"
:
"yarn"
,
"runtimeExecutable"
:
"yarn"
,
"runtimeArgs"
:
[
"run"
,
"debug"
,
"dev"
,
"${fileDirname}"
],
"runtimeArgs"
:
[
"run"
,
"debug"
,
"dev"
,
"${fileDirname}"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"skipFiles"
:
[
"<node_internals>/**"
],
"port"
:
9229
"port"
:
9229
,
"env"
:
{
"NEXT_PRIVATE_LOCAL_WEBPACK5"
:
"1"
}
}
}
]
]
}
}
bench/nested-deps/.gitignore
View file @
3375e663
components/*
components/*
CPU*
\ No newline at end of file
bench/nested-deps/next.config.js
View file @
3375e663
...
@@ -2,6 +2,10 @@ module.exports = {
...
@@ -2,6 +2,10 @@ module.exports = {
eslint
:
{
eslint
:
{
ignoreDuringBuilds
:
true
,
ignoreDuringBuilds
:
true
,
},
},
webpack
(
config
)
{
config
.
module
.
unsafeCache
=
true
return
config
},
experimental
:
{
experimental
:
{
swcLoader
:
true
,
swcLoader
:
true
,
swcMinify
:
true
,
swcMinify
:
true
,
...
...
bench/nested-deps/package.json
View file @
3375e663
{
{
"scripts"
:
{
"scripts"
:
{
"prepare"
:
"rm -rf components && mkdir components && node ./fuzzponent.js -d 2 -s 206 -o components"
,
"prepare"
:
"rm -rf components && mkdir components && node ./fuzzponent.js -d 2 -s 206 -o components"
,
"dev"
:
"../../node_modules/.bin/next dev"
,
"dev"
:
"
NEXT_PRIVATE_LOCAL_WEBPACK5=1
../../node_modules/.bin/next dev"
,
"build"
:
"../../node_modules/.bin/next build"
,
"build"
:
"
NEXT_PRIVATE_LOCAL_WEBPACK5=1
../../node_modules/.bin/next build"
,
"start"
:
"../../node_modules/.bin/next start"
,
"start"
:
"
NEXT_PRIVATE_LOCAL_WEBPACK5=1
../../node_modules/.bin/next start"
,
"dev-nocache"
:
"rm -rf .next && yarn dev"
,
"dev-nocache"
:
"rm -rf .next && yarn dev"
,
"dev-cpuprofile-nocache"
:
"rm -rf .next && NEXT_PRIVATE_LOCAL_WEBPACK5=1 node --cpu-prof ../../node_modules/.bin/next"
,
"build-nocache"
:
"rm -rf .next && yarn build"
"build-nocache"
:
"rm -rf .next && yarn build"
}
}
}
}
packages/next/trace/trace.ts
View file @
3375e663
import
{
randomBytes
}
from
'crypto
'
import
{
customAlphabet
}
from
'next/dist/compiled/nanoid/index.cjs
'
import
{
SpanId
}
from
'./shared'
import
{
SpanId
}
from
'./shared'
import
{
reporter
}
from
'./report'
import
{
reporter
}
from
'./report'
const
NUM_OF_MICROSEC_IN_SEC
=
BigInt
(
'1000'
)
const
NUM_OF_MICROSEC_IN_SEC
=
BigInt
(
'1000'
)
const
nanoid
=
customAlphabet
(
'0123456789abcdefghijklmnopqrstuvwxyz'
,
8
)
const
getId
=
()
=>
randomBytes
(
8
).
toString
(
'hex'
)
const
getId
=
()
=>
Buffer
.
from
(
nanoid
(),
'utf8'
).
toString
(
'hex'
)
// eslint typescript has a bug with TS enums
// eslint typescript has a bug with TS enums
/* eslint-disable no-shadow */
/* eslint-disable no-shadow */
...
...
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