Skip to content

Commit 6006cb6

Browse files
committed
add CI script for benchmarks
1 parent ac414a8 commit 6006cb6

File tree

3 files changed

+259
-0
lines changed

3 files changed

+259
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: next_swc Benchmark
2+
on:
3+
workflow_dispatch: {}
4+
jobs:
5+
benchmark:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
pages: [0, 1, 12]
10+
steps:
11+
- uses: actions/checkout
12+
- name: Install heaptrack
13+
run: apt install heaptrack
14+
- name: Build binary
15+
run: cargo build --profile release-with-debug --manifest-path $GITHUB_WORKSPACE/packages/next-swc/crates/next-build-test/Cargo.toml
16+
- name: Run benchmark
17+
run: bash bench.sh 29de71d77fd3db93c33cc3886c64a32ad889278f ${{ matrix.pages }}
18+
- name: Print results
19+
run: tail -n 7 result.log
20+
- name: Upload reports
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: resport
24+
path: result.log
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"compilerOptions": {
3+
"esModuleInterop": true,
4+
"forceConsistentCasingInFileNames": true,
5+
"noFallthroughCasesInSwitch": true,
6+
"noUncheckedIndexedAccess": false,
7+
"skipLibCheck": true,
8+
"strict": true,
9+
"lib": [
10+
"lib.dom.d.ts",
11+
"lib.dom.iterable.d.ts",
12+
"lib.esnext.d.ts"
13+
],
14+
"module": 99,
15+
"target": 8,
16+
"moduleResolution": 2,
17+
"incremental": true,
18+
"noEmit": true,
19+
"resolveJsonModule": true,
20+
"isolatedModules": true,
21+
"jsx": 1,
22+
"plugins": [
23+
{
24+
"name": "typescript-plugin-css-modules",
25+
"options": {
26+
"goToDefinition": true
27+
}
28+
},
29+
{
30+
"name": "next"
31+
}
32+
],
33+
"allowJs": true,
34+
"paths": {},
35+
"tsBuildInfoFile": "/tmp/ignore",
36+
"strictNullChecks": true,
37+
"pathsBasePath": "/tmp/ignore"
38+
}
39+
}
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
{
2+
"env": {},
3+
"webpack": {},
4+
"eslint": {
5+
"ignoreDuringBuilds": false
6+
},
7+
"typescript": {
8+
"ignoreBuildErrors": false,
9+
"tsconfigPath": "tsconfig.json"
10+
},
11+
"distDir": ".next",
12+
"cleanDistDir": true,
13+
"assetPrefix": "",
14+
"cacheMaxMemorySize": 52428800,
15+
"configOrigin": "next.config.mjs",
16+
"useFileSystemPublicRoutes": true,
17+
"generateBuildId": null,
18+
"generateEtags": true,
19+
"pageExtensions": [
20+
"jsx",
21+
"js",
22+
"tsx",
23+
"ts",
24+
"mdx",
25+
"md"
26+
],
27+
"poweredByHeader": true,
28+
"compress": true,
29+
"analyticsId": "",
30+
"images": {
31+
"deviceSizes": [
32+
640,
33+
750,
34+
828,
35+
1080,
36+
1200,
37+
1920,
38+
2048,
39+
3840
40+
],
41+
"imageSizes": [
42+
16,
43+
32,
44+
48,
45+
64,
46+
96,
47+
128,
48+
256,
49+
384
50+
],
51+
"path": "/_next/image",
52+
"loader": "default",
53+
"loaderFile": "",
54+
"domains": [
55+
"vercel.com",
56+
"assets.vercel.com",
57+
"api-frameworks.vercel.sh",
58+
"github.com",
59+
"images.ctfassets.net",
60+
"og-image.vercel.app",
61+
"cdn.cosmicjs.com",
62+
"cdn.raster.app",
63+
"img.youtube.com",
64+
"raw.githubusercontent.com",
65+
"www.datocms-assets.com",
66+
"t3.gstatic.com",
67+
"res.cloudinary.com"
68+
],
69+
"disableStaticImages": false,
70+
"minimumCacheTTL": 60,
71+
"formats": [
72+
"image/avif",
73+
"image/webp"
74+
],
75+
"dangerouslyAllowSVG": false,
76+
"contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
77+
"contentDispositionType": "inline",
78+
"remotePatterns": [
79+
{
80+
"protocol": "https",
81+
"hostname": "dmmcy0pwk6bqi.cloudfront.net"
82+
}
83+
],
84+
"unoptimized": false
85+
},
86+
"devIndicators": {
87+
"buildActivity": true,
88+
"buildActivityPosition": "bottom-right"
89+
},
90+
"onDemandEntries": {
91+
"maxInactiveAge": 60000,
92+
"pagesBufferLength": 5
93+
},
94+
"amp": {
95+
"canonicalBase": ""
96+
},
97+
"basePath": "",
98+
"sassOptions": {},
99+
"trailingSlash": false,
100+
"i18n": null,
101+
"productionBrowserSourceMaps": false,
102+
"optimizeFonts": true,
103+
"excludeDefaultMomentLocales": true,
104+
"serverRuntimeConfig": {},
105+
"publicRuntimeConfig": {},
106+
"reactProductionProfiling": false,
107+
"reactStrictMode": true,
108+
"httpAgentOptions": {
109+
"keepAlive": true
110+
},
111+
"outputFileTracing": true,
112+
"staticPageGenerationTimeout": 60,
113+
"swcMinify": true,
114+
"modularizeImports": {},
115+
"experimental": {
116+
"prerenderEarlyExit": false,
117+
"serverMinification": true,
118+
"serverSourceMaps": false,
119+
"linkNoTouchStart": false,
120+
"caseSensitiveRoutes": false,
121+
"clientRouterFilter": true,
122+
"clientRouterFilterRedirects": false,
123+
"fetchCacheKeyPrefix": "",
124+
"middlewarePrefetch": "flexible",
125+
"optimisticClientCache": true,
126+
"manualClientBasePath": false,
127+
"cpus": 2,
128+
"memoryBasedWorkersCount": false,
129+
"isrFlushToDisk": true,
130+
"workerThreads": false,
131+
"optimizeCss": false,
132+
"nextScriptWorkers": false,
133+
"scrollRestoration": false,
134+
"externalDir": false,
135+
"disableOptimizedLoading": false,
136+
"gzipSize": true,
137+
"craCompat": false,
138+
"esmExternals": true,
139+
"fullySpecified": false,
140+
"outputFileTracingRoot": "/tmp/ignore",
141+
"swcTraceProfiling": false,
142+
"forceSwcTransforms": false,
143+
"largePageDataBytes": 128000,
144+
"adjustFontFallbacks": false,
145+
"adjustFontFallbacksWithSizeAdjust": false,
146+
"turbo": {
147+
"rules": {
148+
"*.mdx": {
149+
"loaders": [
150+
"turbopack-mdx-loader"
151+
],
152+
"as": "*.tsx"
153+
}
154+
},
155+
"resolveAlias": {
156+
"fs": {
157+
"browser": "./turbopack/empty.js"
158+
},
159+
"cookie": {
160+
"browser": "./turbopack/empty.js"
161+
},
162+
"http": {
163+
"browser": "./turbopack/empty.js"
164+
},
165+
"https": {
166+
"browser": "./turbopack/empty.js"
167+
},
168+
"node-fetch": {
169+
"browser": "./turbopack/empty.js"
170+
}
171+
}
172+
},
173+
"typedRoutes": false,
174+
"instrumentationHook": true,
175+
"bundlePagesExternals": false,
176+
"parallelServerCompiles": false,
177+
"parallelServerBuildTraces": false,
178+
"ppr": false,
179+
"missingSuspenseWithCSRBailout": true,
180+
"optimizeServerReact": true,
181+
"useEarlyImport": false,
182+
"serverComponentsExternalPackages": [],
183+
"useLightningcss": true,
184+
"optimizePackageImports": []
185+
},
186+
"configFile": "/tmp/ignore",
187+
"configFileName": "next.config.mjs",
188+
"transpilePackages": [],
189+
"_originalRewrites": {
190+
"beforeFiles": [],
191+
"afterFiles": [],
192+
"fallback": []
193+
},
194+
"_originalRedirects": [],
195+
"exportPathMap": {}
196+
}

0 commit comments

Comments
 (0)