-
Notifications
You must be signed in to change notification settings - Fork 28.6k
chore(ci): Configure small benchmark for builds #79796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a43b3d8
Initialize directory
kdy1 beac1bd
run pnpm manually
kdy1 7a86663
cfg(codspeed)
kdy1 1482460
rt
kdy1 6b53960
fix
kdy1 c4e978c
allow unused
kdy1 7e2d72e
mut
kdy1 3902f4e
#!
kdy1 ac27a5b
turbopack-benchmark
kdy1 472127c
turbo env
kdy1 28aa203
Rename & split
kdy1 4844219
force_memory_cleanup: true
kdy1 ab5ee2d
run bench
kdy1 027f155
exclude node modules
kdy1 cdc5de2
Why
kdy1 cbc470e
sample size
kdy1 9c53dea
fix CI
kdy1 67e411b
sample size 10
kdy1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,13 @@ env: | |
CARGO_INCREMENTAL: 0 | ||
# For faster CI | ||
RUST_LOG: 'off' | ||
TURBO_TEAM: 'vercel' | ||
TURBO_CACHE: 'remote:rw' | ||
TURBO_TOKEN: ${{ secrets.HOSTED_TURBO_TOKEN }} | ||
|
||
jobs: | ||
benchmark-small: | ||
name: Benchmark Rust Crates (small) | ||
benchmark-tiny: | ||
name: Benchmark Rust Crates (tiny) | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -50,6 +53,43 @@ jobs: | |
run: cargo codspeed run | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
|
||
benchmark-small-apps: | ||
name: Benchmark Rust Crates (small apps) | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup-rust | ||
|
||
- name: Install cargo-codspeed | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Cache on ${{ github.ref_name }} | ||
uses: ijjk/[email protected] | ||
with: | ||
save-if: 'true' | ||
cache-provider: 'turbo' | ||
shared-key: build-turbopack-benchmark-small-apps-${{ hashFiles('.cargo/config.toml') }} | ||
|
||
- name: Install pnpm dependencies | ||
working-directory: turbopack/benchmark-apps | ||
run: | | ||
npm i -g [email protected] | ||
corepack enable | ||
pnpm install --loglevel error | ||
|
||
- name: Build app build benchmarks | ||
run: cargo codspeed build -p turbopack-cli small_apps | ||
|
||
- name: Run the benchmarks | ||
uses: CodSpeedHQ/action@v3 | ||
with: | ||
run: cargo codspeed run | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
|
||
benchmark-large: | ||
name: Benchmark Rust Crates (large) | ||
# If the task is triggered manually, we want to run the large benchmarks | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Benchmark Apps | ||
|
||
This directory contains apps that are used to benchmark the performance of Turbopack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as React from 'react' | ||
import * as DateFns from 'date-fns' | ||
|
||
console.log(DateFns) | ||
|
||
export default function Home() { | ||
return <div>Benchmark</div> | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as React from 'react' | ||
import { format } from 'date-fns' | ||
|
||
export default function Home() { | ||
return <div>{format(new Date(), "'Today is a' eeee")}</div> | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-disable react/jsx-pascal-case */ | ||
import * as React from 'react' | ||
import * as FramerMotion from 'framer-motion' | ||
|
||
console.log(FramerMotion) | ||
|
||
export default function Home() { | ||
return ( | ||
<div> | ||
<FramerMotion.motion.div animate={{ x: 0 }} /> | ||
</div> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as React from 'react' | ||
import { motion } from 'framer-motion' | ||
|
||
export default function Home() { | ||
return ( | ||
<div> | ||
<motion.div animate={{ x: 0 }} /> | ||
</div> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as React from 'react' | ||
import { Container, Typography, Box, Link } from '@mui/joy' | ||
import ProTip from './ProTip' | ||
|
||
function Copyright() { | ||
return ( | ||
<Typography | ||
textAlign="center" | ||
sx={{ | ||
color: 'text.secondary', | ||
}} | ||
> | ||
{'Copyright © '} | ||
<Link href="https://mui.com/">Your Website</Link>{' '} | ||
{new Date().getFullYear()}. | ||
</Typography> | ||
) | ||
} | ||
|
||
export default function App() { | ||
return ( | ||
<Container maxWidth="sm"> | ||
<Box sx={{ my: 4 }}> | ||
<Typography level="h4" component="h1" sx={{ mb: 2 }}> | ||
Material UI Vite.js example in TypeScript | ||
</Typography> | ||
<ProTip /> | ||
<Copyright /> | ||
</Box> | ||
</Container> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from 'react' | ||
import { Link, Typography, SvgIcon, type SvgIconProps } from '@mui/joy' | ||
|
||
function LightBulbIcon(props: SvgIconProps) { | ||
return ( | ||
<SvgIcon {...props}> | ||
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z" /> | ||
</SvgIcon> | ||
) | ||
} | ||
|
||
export default function ProTip() { | ||
return ( | ||
<Typography sx={{ mt: 6, mb: 3, color: 'text.secondary' }}> | ||
<LightBulbIcon sx={{ mr: 1, verticalAlign: 'middle' }} /> | ||
{'Pro tip: See more '} | ||
<Link href="https://mui.com/material-ui/getting-started/templates/"> | ||
templates | ||
</Link> | ||
{' in the Material UI documentation.'} | ||
</Typography> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-joy/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import { CssBaseline } from '@mui/joy' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<CssBaseline /> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as React from 'react' | ||
import * as Icons from 'lucide-react' | ||
|
||
export default function Home() { | ||
const dynamicName = 'Camera' | ||
const Icon = Icons[dynamicName] | ||
return ( | ||
<div> | ||
<Icon /> | ||
</div> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as React from 'react' | ||
import { Camera } from 'lucide-react' | ||
|
||
export default function Home() { | ||
return ( | ||
<div> | ||
<Camera /> | ||
</div> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src-mui/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react' | ||
import * as ReactDOM from 'react-dom/client' | ||
import App from './App' | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as React from 'react' | ||
import Container from '@mui/material/Container' | ||
import Typography from '@mui/material/Typography' | ||
import Box from '@mui/material/Box' | ||
import Link from '@mui/material/Link' | ||
import ProTip from './components/ProTip' | ||
import Copyright from './components/Copyright' | ||
|
||
export default function Home() { | ||
return ( | ||
<Container maxWidth="lg"> | ||
<Box | ||
sx={{ | ||
my: 4, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Typography variant="h4" component="h1" sx={{ mb: 2 }}> | ||
Material UI - Next.js App Router example in TypeScript | ||
</Typography> | ||
<Link href="/about" color="secondary"> | ||
Go to the about page | ||
</Link> | ||
<ProTip /> | ||
<Copyright /> | ||
</Box> | ||
</Container> | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.