Unverified Commit 3375e663 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Additional bench tracing improvements (#29325)

parent 7f998950
...@@ -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"
}
} }
] ]
} }
components/* components/*
CPU*
\ No newline at end of file
...@@ -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,
......
{ {
"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"
} }
} }
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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment