Skip to content

Commit 51092ee

Browse files
authored
test(turbopack): Configure HMR benchmark (#80219)
### What? Configure HMR benchmark. I'm not sure if this benchmark would be stable enough, but let's try. I'll remove this from the automated benchmark later this week if it turns out to be flaky. ### Why? x-ref: https://vercel.slack.com/archives/C06PPGZ0FD3/p1748943158878159 ### How? Closes PACK-4758
1 parent d5c5cde commit 51092ee

File tree

6 files changed

+676
-18
lines changed

6 files changed

+676
-18
lines changed

.github/workflows/turbopack-benchmark.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,29 @@ env:
2626
TURBO_TOKEN: ${{ secrets.HOSTED_TURBO_TOKEN }}
2727

2828
jobs:
29+
benchmark-tiny:
30+
name: Benchmark Rust Crates (tiny)
31+
runs-on: ['self-hosted', 'linux', 'x64', 'metal']
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Setup Rust toolchain
36+
uses: ./.github/actions/setup-rust
37+
38+
- name: Install cargo-codspeed
39+
uses: taiki-e/install-action@v2
40+
with:
41+
42+
43+
- name: Build the benchmark target(s)
44+
run: cargo codspeed build -p next-api
45+
46+
- name: Run the benchmarks
47+
uses: CodSpeedHQ/action@v3
48+
with:
49+
run: cargo codspeed run
50+
token: ${{ secrets.CODSPEED_TOKEN }}
51+
2952
benchmark-small-apps:
3053
name: Benchmark Rust Crates (small apps)
3154
runs-on: ['self-hosted', 'linux', 'x64', 'metal']

Cargo.lock

Lines changed: 114 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ criterion = { package = "codspeed-criterion-compat", version = "2.10.1" }
336336
crossbeam-channel = "0.5.8"
337337
dashmap = "6.1.0"
338338
data-encoding = "2.3.3"
339+
divan = { version = "2.10.1", package = "codspeed-divan-compat" }
339340
dhat = { version = "0.3.2" }
340341
dunce = "1.0.3"
341342
either = "1.9.0"

crates/next-api/Cargo.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ autobenches = false
99
[lib]
1010
bench = false
1111

12+
[[bench]]
13+
name = "hmr"
14+
harness = false
15+
1216
[lints]
1317
workspace = true
1418

@@ -25,7 +29,7 @@ serde_json = { workspace = true }
2529
swc_core = { workspace = true }
2630
tracing = { workspace = true }
2731
turbo-rcstr = { workspace = true }
28-
turbo-tasks = { workspace = true }
32+
turbo-tasks = { workspace = true, features = ["non_operation_vc_strongly_consistent"] }
2933
turbo-tasks-env = { workspace = true }
3034
turbo-tasks-fs = { workspace = true }
3135
turbopack = { workspace = true }
@@ -36,6 +40,14 @@ turbopack-node = { workspace = true }
3640
turbopack-nodejs = { workspace = true }
3741
turbopack-wasm = { workspace = true }
3842

43+
[dev-dependencies]
44+
turbo-tasks-malloc = { workspace = true }
45+
divan = { workspace = true }
46+
tokio = { workspace = true }
47+
tempfile = { workspace = true }
48+
turbo-tasks-backend = { workspace = true }
49+
50+
3951
[build-dependencies]
4052
anyhow = { workspace = true }
4153
turbo-tasks-build = { workspace = true }

0 commit comments

Comments
 (0)