Skip to content

Commit 567a9a7

Browse files
committed
add CI script for benchmarks
1 parent 56b80de commit 567a9a7

File tree

3 files changed

+227
-0
lines changed

3 files changed

+227
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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: report
24+
path: |
25+
result.log
26+
heaptrack.*
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"compilerOptions": {
3+
"esModuleInterop": true,
4+
"forceConsistentCasingInFileNames": true,
5+
"noFallthroughCasesInSwitch": true,
6+
"noUncheckedIndexedAccess": false,
7+
"skipLibCheck": true,
8+
"strict": true,
9+
"lib": ["lib.dom.d.ts", "lib.dom.iterable.d.ts", "lib.esnext.d.ts"],
10+
"module": 99,
11+
"target": 8,
12+
"moduleResolution": 2,
13+
"incremental": true,
14+
"noEmit": true,
15+
"resolveJsonModule": true,
16+
"isolatedModules": true,
17+
"jsx": 1,
18+
"plugins": [
19+
{
20+
"name": "typescript-plugin-css-modules",
21+
"options": {
22+
"goToDefinition": true
23+
}
24+
},
25+
{
26+
"name": "next"
27+
}
28+
],
29+
"allowJs": true,
30+
"paths": {},
31+
"tsBuildInfoFile": "/tmp/ignore",
32+
"strictNullChecks": true,
33+
"pathsBasePath": "/tmp/ignore"
34+
}
35+
}
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
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": ["jsx", "js", "tsx", "ts", "mdx", "md"],
20+
"poweredByHeader": true,
21+
"compress": true,
22+
"analyticsId": "",
23+
"images": {
24+
"deviceSizes": [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
25+
"imageSizes": [16, 32, 48, 64, 96, 128, 256, 384],
26+
"path": "/_next/image",
27+
"loader": "default",
28+
"loaderFile": "",
29+
"domains": [
30+
"vercel.com",
31+
"assets.vercel.com",
32+
"api-frameworks.vercel.sh",
33+
"github.com",
34+
"images.ctfassets.net",
35+
"og-image.vercel.app",
36+
"cdn.cosmicjs.com",
37+
"cdn.raster.app",
38+
"img.youtube.com",
39+
"raw.githubusercontent.com",
40+
"www.datocms-assets.com",
41+
"t3.gstatic.com",
42+
"res.cloudinary.com"
43+
],
44+
"disableStaticImages": false,
45+
"minimumCacheTTL": 60,
46+
"formats": ["image/avif", "image/webp"],
47+
"dangerouslyAllowSVG": false,
48+
"contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
49+
"contentDispositionType": "inline",
50+
"remotePatterns": [
51+
{
52+
"protocol": "https",
53+
"hostname": "dmmcy0pwk6bqi.cloudfront.net"
54+
}
55+
],
56+
"unoptimized": false
57+
},
58+
"devIndicators": {
59+
"buildActivity": true,
60+
"buildActivityPosition": "bottom-right"
61+
},
62+
"onDemandEntries": {
63+
"maxInactiveAge": 60000,
64+
"pagesBufferLength": 5
65+
},
66+
"amp": {
67+
"canonicalBase": ""
68+
},
69+
"basePath": "",
70+
"sassOptions": {},
71+
"trailingSlash": false,
72+
"i18n": null,
73+
"productionBrowserSourceMaps": false,
74+
"optimizeFonts": true,
75+
"excludeDefaultMomentLocales": true,
76+
"serverRuntimeConfig": {},
77+
"publicRuntimeConfig": {},
78+
"reactProductionProfiling": false,
79+
"reactStrictMode": true,
80+
"httpAgentOptions": {
81+
"keepAlive": true
82+
},
83+
"outputFileTracing": true,
84+
"staticPageGenerationTimeout": 60,
85+
"swcMinify": true,
86+
"modularizeImports": {},
87+
"experimental": {
88+
"prerenderEarlyExit": false,
89+
"serverMinification": true,
90+
"serverSourceMaps": false,
91+
"linkNoTouchStart": false,
92+
"caseSensitiveRoutes": false,
93+
"clientRouterFilter": true,
94+
"clientRouterFilterRedirects": false,
95+
"fetchCacheKeyPrefix": "",
96+
"middlewarePrefetch": "flexible",
97+
"optimisticClientCache": true,
98+
"manualClientBasePath": false,
99+
"cpus": 2,
100+
"memoryBasedWorkersCount": false,
101+
"isrFlushToDisk": true,
102+
"workerThreads": false,
103+
"optimizeCss": false,
104+
"nextScriptWorkers": false,
105+
"scrollRestoration": false,
106+
"externalDir": false,
107+
"disableOptimizedLoading": false,
108+
"gzipSize": true,
109+
"craCompat": false,
110+
"esmExternals": true,
111+
"fullySpecified": false,
112+
"outputFileTracingRoot": "/tmp/ignore",
113+
"swcTraceProfiling": false,
114+
"forceSwcTransforms": false,
115+
"largePageDataBytes": 128000,
116+
"adjustFontFallbacks": false,
117+
"adjustFontFallbacksWithSizeAdjust": false,
118+
"turbo": {
119+
"rules": {
120+
"*.mdx": {
121+
"loaders": ["turbopack-mdx-loader"],
122+
"as": "*.tsx"
123+
}
124+
},
125+
"resolveAlias": {
126+
"fs": {
127+
"browser": "./turbopack/empty.js"
128+
},
129+
"cookie": {
130+
"browser": "./turbopack/empty.js"
131+
},
132+
"http": {
133+
"browser": "./turbopack/empty.js"
134+
},
135+
"https": {
136+
"browser": "./turbopack/empty.js"
137+
},
138+
"node-fetch": {
139+
"browser": "./turbopack/empty.js"
140+
}
141+
}
142+
},
143+
"typedRoutes": false,
144+
"instrumentationHook": true,
145+
"bundlePagesExternals": false,
146+
"parallelServerCompiles": false,
147+
"parallelServerBuildTraces": false,
148+
"ppr": false,
149+
"missingSuspenseWithCSRBailout": true,
150+
"optimizeServerReact": true,
151+
"useEarlyImport": false,
152+
"serverComponentsExternalPackages": [],
153+
"useLightningcss": true,
154+
"optimizePackageImports": []
155+
},
156+
"configFile": "/tmp/ignore",
157+
"configFileName": "next.config.mjs",
158+
"transpilePackages": [],
159+
"_originalRewrites": {
160+
"beforeFiles": [],
161+
"afterFiles": [],
162+
"fallback": []
163+
},
164+
"_originalRedirects": [],
165+
"exportPathMap": {}
166+
}

0 commit comments

Comments
 (0)