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 @@
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "debug", "dev", "test/integration/basic"],
"runtimeArgs": ["run", "debug", "dev", "bench/nested-deps"],
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"],
"port": 9229
"port": 9229,
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
},
{
"name": "Launch app build",
......@@ -21,10 +24,13 @@
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "debug", "build", "test/integration/basic"],
"runtimeArgs": ["run", "debug", "build", "bench/nested-deps"],
"skipFiles": ["<node_internals>/**"],
"port": 9229,
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"]
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"],
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
},
{
"name": "Launch app build trace jaeger",
......@@ -35,7 +41,10 @@
"runtimeArgs": ["run", "clean-trace-jaeger"],
"skipFiles": ["<node_internals>/**"],
"port": 9229,
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"]
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"],
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
},
{
"name": "Launch app production",
......@@ -43,9 +52,12 @@
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "debug", "start", "test/integration/basic"],
"runtimeArgs": ["run", "debug", "start", "bench/nested-deps"],
"skipFiles": ["<node_internals>/**"],
"port": 9229
"port": 9229,
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
},
{
"type": "node",
......@@ -53,7 +65,10 @@
"name": "Attach to existing debugger",
"port": 9229,
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"]
"outFiles": ["${workspaceFolder}/packages/next/dist/**/*"],
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
},
{
"name": "Launch this example",
......@@ -63,7 +78,10 @@
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "debug", "dev", "${fileDirname}"],
"skipFiles": ["<node_internals>/**"],
"port": 9229
"port": 9229,
"env": {
"NEXT_PRIVATE_LOCAL_WEBPACK5": "1"
}
}
]
}
components/*
CPU*
\ No newline at end of file
......@@ -2,6 +2,10 @@ module.exports = {
eslint: {
ignoreDuringBuilds: true,
},
webpack(config) {
config.module.unsafeCache = true
return config
},
experimental: {
swcLoader: true,
swcMinify: true,
......
{
"scripts": {
"prepare": "rm -rf components && mkdir components && node ./fuzzponent.js -d 2 -s 206 -o components",
"dev": "../../node_modules/.bin/next dev",
"build": "../../node_modules/.bin/next build",
"start": "../../node_modules/.bin/next start",
"dev": "NEXT_PRIVATE_LOCAL_WEBPACK5=1 ../../node_modules/.bin/next dev",
"build": "NEXT_PRIVATE_LOCAL_WEBPACK5=1 ../../node_modules/.bin/next build",
"start": "NEXT_PRIVATE_LOCAL_WEBPACK5=1 ../../node_modules/.bin/next start",
"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"
}
}
import { randomBytes } from 'crypto'
import { customAlphabet } from 'next/dist/compiled/nanoid/index.cjs'
import { SpanId } from './shared'
import { reporter } from './report'
const NUM_OF_MICROSEC_IN_SEC = BigInt('1000')
const getId = () => randomBytes(8).toString('hex')
const nanoid = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8)
const getId = () => Buffer.from(nanoid(), 'utf8').toString('hex')
// eslint typescript has a bug with TS enums
/* 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