Skip to content

test(benchmark): cover concurrent integrity extraction - #13433

Merged
zkochan merged 1 commit into
mainfrom
test-vercel2
Jul 27, 2026
Merged

zkochan merged 1 commit into
mainfrom
test-vercel2

Conversation

@zkochan

@zkochan zkochan commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a Criterion benchmark for the integrity and extraction workload exposed by #13305.

The benchmark downloads 256 concurrent tarballs into cold stores. Each tarball contains 64 files, crossing the per-tarball parallel extraction threshold that is not exercised by the existing single-package integrity benchmark.

This is benchmark-only infrastructure and does not change either CLI implementation or a published package.

Squash Commit Body

Add a concurrent cold-store tarball benchmark alongside the existing single-package integrity benchmark.

The workload covers many file-heavy tarballs in flight at once, matching the extraction shape that made the Rust engine slower than the TypeScript CLI on the Next.js workspace in pnpm/pnpm#13305.

Checklist

  • Added or updated tests.

Written by an agent (Codex, GPT-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added a benchmark for downloading and storing multiple tarballs concurrently.
    • Added support for generating and testing batches of compressed package archives.
  • Performance

    • Expanded benchmark coverage to measure concurrent package download workflows alongside existing single-package benchmarks.

Copilot AI review requested due to automatic review settings July 27, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The micro-benchmark adds gzip and async coordination dependencies, generates multiple tarballs, and benchmarks their concurrent download and storage alongside existing benchmarks.

Changes

Concurrent tarball benchmarking

Layer / File(s) Summary
Benchmark dependencies and setup
pnpm/tasks/micro-benchmark/Cargo.toml, pnpm/tasks/micro-benchmark/src/main.rs
Adds flate2, futures-util, and tar dependencies, imports gzip and concurrency utilities, and defines batch sizing constants.
Concurrent tarball generation and download
pnpm/tasks/micro-benchmark/src/main.rs
Generates deterministic gzipped tarballs, serves mock package endpoints, downloads packages concurrently into a shared store, aggregates results, and invokes the benchmark from main().

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test-vercel2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add concurrent cold-store tarball extraction Criterion benchmark

🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Add a new Criterion benchmark that downloads/extracts 256 tarballs concurrently into cold stores.
• Generate synthetic .tgz fixtures (64 files each) to exercise per-tarball parallel extraction.
• Extend micro-benchmark crate dependencies to support tar.gz generation and async fan-out.
Diagram

graph TD
A["micro-benchmark (main)"] --> B["Criterion tarball_batch"] --> E["Tokio runtime"] --> F["256 concurrent tasks"] --> G["DownloadTarballToStore"] --> H[("Cold StoreDir")]
A --> C["Build tar.gz fixtures"] --> D{{"Mock HTTP"}}
G -->|"GET batch tarballs"| D
subgraph Legend
direction LR
_proc["Process"] ~~~ _ext{{"External"}} ~~~ _db[("Store")]
end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use on-disk prebuilt tarball fixtures instead of generating tar.gz in code
  • ➕ Avoids bringing tar/flate2 deps into the benchmark crate
  • ➕ Makes the workload closer to real-world tarball bytes (if sourced from real packages)
  • ➖ Requires storing/maintaining large binary fixtures in-repo (or a download step)
  • ➖ Harder to parameterize tarball shape (file count/size) for targeted regressions
2. Benchmark extraction/integrity without HTTP (read tarballs from disk)
  • ➕ Reduces noise from HTTP client/mocking overhead
  • ➕ Narrows measurement to verify+extract pipeline
  • ➖ Does not exercise the same end-to-end path as installs (download + store write)
  • ➖ May miss contention patterns that show up with many in-flight downloads
3. Stream concurrency via FuturesUnordered / for_each_concurrent instead of try_join_all
  • ➕ Lower peak allocation and potentially smoother scheduling under high concurrency
  • ➕ Easier to add explicit concurrency limits later (e.g., semaphore)
  • ➖ Slightly more complex benchmark code; current join_all is straightforward and acceptable at 256 tasks

Recommendation: The current approach is a good fit for the stated goal: it deterministically reproduces the many-tarballs-in-flight install shape (including integrity and extraction) without external dependencies. If the benchmark needs to become more representative of real registries over time, consider switching to on-disk/real tarball bytes, but keep the synthetic generator as a regression harness for specific file-count thresholds.

Files changed (3) +110 / -1

Tests (1) +104 / -1
main.rsAdd concurrent cold-store tarball download+verify+extract benchmark +104/-1

Add concurrent cold-store tarball download+verify+extract benchmark

• Introduces a new Criterion benchmark group that downloads 256 mocked tarballs concurrently, verifies integrity, and extracts into a fresh cold StoreDir per iteration. Adds helper code to synthesize gzipped tar archives with 64 files each and compute per-package integrity/unpacked metadata for the benchmark inputs.

pnpm/tasks/micro-benchmark/src/main.rs

Other (2) +6 / -0
Cargo.lockAdd micro-benchmark transitive deps for tar.gz and async fan-out +3/-0

Add micro-benchmark transitive deps for tar.gz and async fan-out

• Updates the lockfile to include flate2, futures-util, and tar as dependencies of the micro-benchmark crate so the new benchmark can generate gzipped tarballs and run concurrent futures.

Cargo.lock

Cargo.tomlAdd tar/flate2/futures-util dependencies to micro-benchmark crate +3/-0

Add tar/flate2/futures-util dependencies to micro-benchmark crate

• Extends the micro-benchmark crate dependencies to support building tar.gz payloads (tar + flate2) and coordinating concurrent async operations (futures-util).

pnpm/tasks/micro-benchmark/Cargo.toml

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The benchmark-only changes appear safe to merge, with no concrete defects identified.

The generated package metadata is consistent with the tarball contents, each measured iteration uses a fresh store, and the concurrent downloads are awaited before the result is consumed.

Reviews (1): Last reviewed commit: "test(benchmark): cover concurrent integr..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     12.3±0.36ms    30.6 MB/sec    1.06     13.0±0.58ms    28.7 MB/sec
packument/parse                                  1.00     40.7±0.43µs  1630.7 MB/sec    1.06     43.0±0.76µs  1542.0 MB/sec
tarball/download_dependency                      1.00      2.4±0.15ms  1813.9 KB/sec    1.07      2.5±0.14ms  1702.1 KB/sec
tarball_batch/cold_store_many_medium_tarballs                                           1.00   200.8±10.57ms 79.7 KElem/sec

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 24 rules

Grey Divider


Remediation recommended

1. Leaked StoreDir allocations 🐞 Bug ➹ Performance
Description
bench_concurrent_tarballs leaks a new StoreDir via Box::leak inside the Criterion iteration,
retaining heap allocations for the duration of the process. This is benchmark-only, but it can
inflate memory usage across iterations and reduce CI benchmark reliability over longer runs.
Code

pnpm/tasks/micro-benchmark/src/main.rs[R102-105]

+            let dir = tempdir().unwrap();
+            let store_dir =
+                dir.path().to_path_buf().pipe(StoreDir::from).pipe(Box::new).pipe(Box::leak);
+            let http_client = ThrottledClient::new_for_installs();
Relevance

⭐⭐⭐ High

Team often fixes test/bench global or process-lifetime leakage; easy to leak once outside iter.

PR-#13256
PR-#13227

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The benchmark creates and leaks a StoreDir inside the async iteration closure. This is required
because DownloadTarballToStore’s field type is &'static StoreDir, forcing callers to provide a
'static reference (commonly via leak). The benchmark binary runs in CI for PRs, so retained
allocations affect benchmark job behavior.

pnpm/tasks/micro-benchmark/src/main.rs[100-106]
pnpm/crates/tarball/src/lib.rs[1476-1482]
.github/workflows/pacquet-micro-benchmark.yml[3-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`DownloadTarballToStore` requires `store_dir: &'static StoreDir`, and the benchmark currently satisfies this by leaking a freshly created `StoreDir` on every Criterion iteration. This retains heap allocations until process exit and can skew memory/CPU behavior during the benchmark run.

### Issue Context
The micro-benchmark binary is executed in CI (`pacquet-micro-benchmark.yml`) for PRs touching Rust/Cargo files, so benchmark harness hygiene impacts CI stability and cost.

### Fix Focus Areas
- pnpm/tasks/micro-benchmark/src/main.rs[100-137]
- pnpm/crates/tarball/src/lib.rs[1478-1482]

### Suggested fix
Prefer removing the need for `&'static StoreDir`:
1) Change `DownloadTarballToStore.store_dir` from `&'static StoreDir` to `&'a StoreDir` (it already has a lifetime parameter `'a`).
2) Update call sites to pass `&StoreDir` with normal lifetimes (most already have a long-lived config/store).
3) In the benchmark, use a stack-owned `StoreDir` per iteration (`let store_dir = StoreDir::from(dir.path().to_path_buf());` and pass `&store_dir`), so allocations are dropped each iteration.

If changing the library API is deemed too broad for this PR, at minimum add a comment that this is an intentional leak and ensure Criterion does not run large iteration counts for this benchmark (so retained allocations stay bounded).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Per-download cache allocations 🐞 Bug ➹ Performance
Description
bench_concurrent_tarballs allocates a fresh SharedVerifiedFilesCache (and AuthHeaders) per tarball
download, adding repeated allocation overhead and diverging from the documented “share one per
install” usage. This reduces benchmark fidelity by measuring setup/alloc work that production paths
avoid.
Code

pnpm/tasks/micro-benchmark/src/main.rs[R107-116]

+                let auth_headers = AuthHeaders::default();
+                DownloadTarballToStore {
+                    http_client: &http_client,
+                    store_dir,
+                    store_index: None,
+                    store_index_writer: None,
+                    verify_store_integrity: true,
+                    verified_files_cache: pacquet_store_dir::SharedVerifiedFilesCache::default(),
+                    package_integrity: Some(&package.integrity),
+                    package_unpacked_size: Some(package.unpacked_size),
Relevance

⭐⭐⭐ High

Perf tweaks to avoid repeated per-iteration allocations/caching overhead are commonly accepted;
benchmark fidelity improvement.

PR-#12508
PR-#12372

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The tarball crate explicitly documents verified_files_cache as an install-scoped handle intended
to be shared across DownloadTarballToStore calls, while the benchmark currently creates a new one
per download. Production install code passes a shared cache handle instead of constructing one per
package.

pnpm/tasks/micro-benchmark/src/main.rs[105-116]
pnpm/crates/tarball/src/lib.rs[1513-1522]
pnpm/crates/package-manager/src/install_package_from_registry.rs[173-180]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The benchmark constructs `SharedVerifiedFilesCache::default()` inside each per-package future, and similarly constructs `AuthHeaders::default()` per package. The tarball pipeline documents `verified_files_cache` as an install-scoped dedup cache that should be allocated once and shared across downloads.

### Issue Context
Even though this benchmark targets a cold store with distinct tarballs (so cache hits may be minimal), repeated per-download allocations add noise and move the benchmark away from the real install object-lifetime pattern.

### Fix Focus Areas
- pnpm/tasks/micro-benchmark/src/main.rs[105-131]
- pnpm/crates/tarball/src/lib.rs[1513-1522]

### Suggested fix
Inside the benchmark iteration, allocate once and reuse:
- `let verified_files_cache = pacquet_store_dir::SharedVerifiedFilesCache::default();`
- `let auth_headers = AuthHeaders::default();`
Then in each `DownloadTarballToStore`, pass:
- `verified_files_cache: SharedVerifiedFilesCache::clone(&verified_files_cache)` (or `Arc::clone` depending on the type)
- `auth_headers: &auth_headers`
This matches the production install pattern and reduces per-download allocation noise.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.61%. Comparing base (ef32e98) to head (ee69e65).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13433   +/-   ##
=======================================
  Coverage   87.60%   87.61%           
=======================================
  Files         545      545           
  Lines       93698    93746   +48     
=======================================
+ Hits        82085    82134   +49     
+ Misses      11613    11612    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
pnpm/tasks/micro-benchmark/src/main.rs (2)

86-86: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Avoid recomputing benchmark_file just to read a constant length.

benchmark_file always returns a fixed-size buffer (128 bytes), so unpacked_size relies on an implicit, undocumented invariant rather than an explicit constant. A named constant would be clearer and skip the redundant call.

♻️ Proposed fix
+const BENCHMARK_FILE_SIZE: usize = 128;
+
 fn benchmark_file(package_index: usize, file_index: usize) -> Vec<u8> {
     let prefix = format!("package={package_index};file={file_index};").into_bytes();
     let mut content =
-        vec![u8::try_from((package_index + file_index) % 251).expect("value is below 251"); 128];
+        vec![u8::try_from((package_index + file_index) % 251).expect("value is below 251"); BENCHMARK_FILE_SIZE];
     content[..prefix.len()].copy_from_slice(&prefix);
     content
 }

And at the call site:

-                unpacked_size: BATCH_FILES_PER_TARBALL * benchmark_file(package_index, 0).len(),
+                unpacked_size: BATCH_FILES_PER_TARBALL * BENCHMARK_FILE_SIZE,

Also applies to: 165-171

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/tasks/micro-benchmark/src/main.rs` at line 86, Replace the
benchmark_file(...).len() usage when calculating unpacked_size with a named
constant representing the fixed 128-byte benchmark file size, and reuse that
constant at the other affected call sites around the related size calculations.
Define the constant near benchmark_file so the invariant is explicit and avoid
recomputing benchmark_file solely to obtain its length.

106-129: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Share one verified_files_cache across all concurrent tarball downloads.

SharedVerifiedFilesCache is Arc<DashSet<PathBuf>>, and DownloadTarballToStore expects the install-scoped cache to be a single reused handle. Creating it inside packages.iter().map(...) gives this 256-task workload independent caches, so no concurrent integrity stat/cache checks actually contend on the shared in-flight state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/tasks/micro-benchmark/src/main.rs` around lines 106 - 129, Move the
SharedVerifiedFilesCache initialization outside the packages.iter().map
concurrent download closure, then clone and reuse that single handle for each
DownloadTarballToStore instance. Keep the existing cache field wiring intact
while ensuring all downloads share the same install-scoped cache.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pnpm/tasks/micro-benchmark/src/main.rs`:
- Line 86: Replace the benchmark_file(...).len() usage when calculating
unpacked_size with a named constant representing the fixed 128-byte benchmark
file size, and reuse that constant at the other affected call sites around the
related size calculations. Define the constant near benchmark_file so the
invariant is explicit and avoid recomputing benchmark_file solely to obtain its
length.
- Around line 106-129: Move the SharedVerifiedFilesCache initialization outside
the packages.iter().map concurrent download closure, then clone and reuse that
single handle for each DownloadTarballToStore instance. Keep the existing cache
field wiring intact while ensuring all downloads share the same install-scoped
cache.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f2d0a34-a742-4003-8e20-bc05fc8de6fd

📥 Commits

Reviewing files that changed from the base of the PR and between e1babf7 and ee69e65.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
📒 Files selected for processing (2)
  • pnpm/tasks/micro-benchmark/Cargo.toml
  • pnpm/tasks/micro-benchmark/src/main.rs

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: ee69e65c7d18

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.504 ± 0.133 2.389 2.738 1.62 ± 0.18
pacquet@main 2.523 ± 0.140 2.384 2.793 1.63 ± 0.19
pnpr@HEAD 1.549 ± 0.154 1.382 1.807 1.00
pnpr@main 1.662 ± 0.135 1.419 1.797 1.07 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5042148097799997,
      "stddev": 0.133481263686539,
      "median": 2.45624143378,
      "user": 1.66692738,
      "system": 1.33975826,
      "min": 2.38917665128,
      "max": 2.73828110528,
      "times": [
        2.40201278028,
        2.73474259428,
        2.50134978228,
        2.55969473928,
        2.41318947928,
        2.45749018628,
        2.45499268128,
        2.73828110528,
        2.39121809828,
        2.38917665128
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.52271491568,
      "stddev": 0.14025055727687066,
      "median": 2.4688723052799997,
      "user": 1.64689278,
      "system": 1.34794316,
      "min": 2.38414773528,
      "max": 2.79343583328,
      "times": [
        2.61236507928,
        2.47203508528,
        2.42735002728,
        2.79343583328,
        2.65382795528,
        2.62963342828,
        2.39450005828,
        2.38414773528,
        2.39414442928,
        2.46570952528
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.54900296308,
      "stddev": 0.1540837411476117,
      "median": 1.49592943128,
      "user": 1.1194273799999999,
      "system": 1.14703916,
      "min": 1.38194945328,
      "max": 1.8069979812799999,
      "times": [
        1.8069979812799999,
        1.39744975528,
        1.46690119728,
        1.48997349328,
        1.68587109828,
        1.53241753928,
        1.38194945328,
        1.78139924528,
        1.44518449828,
        1.50188536928
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66163086848,
      "stddev": 0.13509851614031362,
      "median": 1.73399076228,
      "user": 1.21543138,
      "system": 1.24849936,
      "min": 1.41887225528,
      "max": 1.79671183328,
      "times": [
        1.74948069728,
        1.73490453428,
        1.75421875428,
        1.79671183328,
        1.73307699028,
        1.58852614628,
        1.41887225528,
        1.5166842362800002,
        1.79223966528,
        1.53159357228
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 285.4 ± 21.4 261.5 333.9 1.01 ± 0.08
pacquet@main 283.7 ± 9.9 259.5 294.7 1.00
pnpr@HEAD 299.7 ± 15.7 268.9 329.0 1.06 ± 0.07
pnpr@main 296.5 ± 7.4 280.2 304.1 1.05 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28538266606,
      "stddev": 0.021435102784943028,
      "median": 0.27505953046000003,
      "user": 0.22275434,
      "system": 0.57431482,
      "min": 0.26149994996000003,
      "max": 0.33389809696000006,
      "times": [
        0.26982840696000004,
        0.26149994996000003,
        0.27450310396000005,
        0.27494938396,
        0.27500885496000005,
        0.27511020596,
        0.30395263496,
        0.28615415596000005,
        0.33389809696000006,
        0.29892186696000006
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.28371128516000005,
      "stddev": 0.009922082338469152,
      "median": 0.28505426896,
      "user": 0.22328134,
      "system": 0.5781035200000001,
      "min": 0.25950746496000004,
      "max": 0.29468641496000003,
      "times": [
        0.29303941896,
        0.28484652896,
        0.28925789096000004,
        0.28526200896000004,
        0.28710304096000006,
        0.25950746496000004,
        0.28112050396000005,
        0.27747813696,
        0.28481144196,
        0.29468641496000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29965606696,
      "stddev": 0.015743100278346495,
      "median": 0.29901639046000006,
      "user": 0.22839273999999996,
      "system": 0.58431072,
      "min": 0.26890007196000004,
      "max": 0.32897303896,
      "times": [
        0.29064918596000006,
        0.29388117196,
        0.29259064596000006,
        0.26890007196000004,
        0.29404866696000004,
        0.30796741196000005,
        0.32897303896,
        0.30561017096000004,
        0.30995619096000004,
        0.30398411396
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29650463636,
      "stddev": 0.007417725495654021,
      "median": 0.29885700546000005,
      "user": 0.23339684000000002,
      "system": 0.57192762,
      "min": 0.28024496796000004,
      "max": 0.30405670996000006,
      "times": [
        0.30125337096000004,
        0.30405670996000006,
        0.28024496796000004,
        0.28903721496,
        0.29259996396000004,
        0.30324048496000006,
        0.29824027596,
        0.29947373496,
        0.29566892296,
        0.30123071696000003
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.107 ± 0.162 2.945 3.413 1.81 ± 0.17
pacquet@main 3.256 ± 0.163 3.025 3.568 1.90 ± 0.17
pnpr@HEAD 1.718 ± 0.132 1.549 1.932 1.00
pnpr@main 1.789 ± 0.118 1.618 2.005 1.04 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.10730358318,
      "stddev": 0.1623835314585372,
      "median": 3.0386210154800004,
      "user": 2.5236554,
      "system": 1.84859306,
      "min": 2.9453531974800002,
      "max": 3.41308806548,
      "times": [
        3.41308806548,
        3.24331985148,
        2.98282667648,
        2.9453531974800002,
        3.05930845648,
        2.98735388548,
        3.01793357448,
        3.13818443648,
        3.30931479248,
        2.9763528954800003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.2557072258799997,
      "stddev": 0.16268141593813537,
      "median": 3.22714947948,
      "user": 2.8531135,
      "system": 2.02675126,
      "min": 3.02502474348,
      "max": 3.56752545248,
      "times": [
        3.1435240324800002,
        3.22921501148,
        3.1517397854800002,
        3.13012980548,
        3.26747348548,
        3.02502474348,
        3.22508394748,
        3.40873386748,
        3.56752545248,
        3.40862212748
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7176466301800002,
      "stddev": 0.13209657367376554,
      "median": 1.71610711748,
      "user": 1.4152765999999999,
      "system": 1.54272396,
      "min": 1.54949958048,
      "max": 1.9321470494800002,
      "times": [
        1.6062123214800001,
        1.5979428484800002,
        1.9061872344800002,
        1.60836806348,
        1.54949958048,
        1.7797898704800001,
        1.68074608048,
        1.7514681544800002,
        1.76410509848,
        1.9321470494800002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.78926304298,
      "stddev": 0.11780149085333183,
      "median": 1.7815969804800003,
      "user": 1.5037984999999998,
      "system": 1.6786652600000003,
      "min": 1.61822914048,
      "max": 2.00466470948,
      "times": [
        1.7065479194800002,
        2.00466470948,
        1.7761885404800002,
        1.79712347048,
        1.83564280448,
        1.6652105494800002,
        1.75881507748,
        1.61822914048,
        1.9432027974800001,
        1.78700542048
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 779.3 ± 41.1 717.9 852.1 2.06 ± 0.17
pacquet@main 738.2 ± 24.3 707.3 775.1 1.95 ± 0.14
pnpr@HEAD 377.7 ± 23.9 340.0 413.6 1.00
pnpr@main 380.6 ± 15.5 362.2 407.4 1.01 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7793287449000001,
      "stddev": 0.04111644635724283,
      "median": 0.7602550018,
      "user": 0.9895761999999999,
      "system": 0.8229633600000001,
      "min": 0.7179124803,
      "max": 0.8520826963,
      "times": [
        0.8006769543000001,
        0.7607248903,
        0.7581068693,
        0.8069535703,
        0.8290220613,
        0.7532046953,
        0.7179124803,
        0.7548181183,
        0.7597851133,
        0.8520826963
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7381893554000001,
      "stddev": 0.024297341806215827,
      "median": 0.7392629052999999,
      "user": 0.9302843,
      "system": 0.78454516,
      "min": 0.7072665503,
      "max": 0.7750860223,
      "times": [
        0.7392673793,
        0.7392584313,
        0.7077989813,
        0.7676378233,
        0.7618398363000001,
        0.7072665503,
        0.7274745323,
        0.7750860223,
        0.7153625473,
        0.7409014503
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3776695416,
      "stddev": 0.023868236832822808,
      "median": 0.37253474129999997,
      "user": 0.273508,
      "system": 0.62718396,
      "min": 0.3399639613,
      "max": 0.4135852693,
      "times": [
        0.3698980553,
        0.4072838953,
        0.4135852693,
        0.3635478593,
        0.3688730593,
        0.3399639613,
        0.3521527313,
        0.3989078823,
        0.3873112753,
        0.37517142729999997
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3806328597,
      "stddev": 0.01546744100999339,
      "median": 0.3781423713,
      "user": 0.2731385,
      "system": 0.64795356,
      "min": 0.3621999073,
      "max": 0.4074409913,
      "times": [
        0.3660965203,
        0.3788250943,
        0.3690469053,
        0.3882475143,
        0.3913548763,
        0.4074409913,
        0.3621999073,
        0.3994608013,
        0.3661963383,
        0.3774596483
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.007 ± 0.059 1.953 2.128 6.06 ± 0.28
pacquet@main 2.105 ± 0.090 1.985 2.275 6.36 ± 0.36
pnpr@HEAD 0.340 ± 0.036 0.315 0.432 1.03 ± 0.11
pnpr@main 0.331 ± 0.012 0.320 0.360 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.00652392476,
      "stddev": 0.058868226659212756,
      "median": 1.99482492506,
      "user": 1.1250037399999997,
      "system": 0.80488114,
      "min": 1.9526229640600001,
      "max": 2.12796125706,
      "times": [
        2.12796125706,
        2.07024926206,
        1.9526229640600001,
        1.9970738630600002,
        1.99384505306,
        2.05269089006,
        1.99580479706,
        1.96078102606,
        1.95827759106,
        1.95593254406
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.10527348066,
      "stddev": 0.08978314852157775,
      "median": 2.08659469006,
      "user": 1.2948525399999997,
      "system": 0.9116561400000001,
      "min": 1.98545955206,
      "max": 2.2745599530600003,
      "times": [
        2.12967160206,
        2.17625473906,
        2.2745599530600003,
        2.20158943906,
        2.09163818506,
        2.08155119506,
        2.04051968306,
        2.03851898306,
        1.98545955206,
        2.03297147506
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.34036931406000004,
      "stddev": 0.03554865980028441,
      "median": 0.32725129506000006,
      "user": 0.23206633999999998,
      "system": 0.56668584,
      "min": 0.31532163606,
      "max": 0.43171757506,
      "times": [
        0.32380592306000006,
        0.31792562106000005,
        0.31532163606,
        0.32786537406000005,
        0.31927032906,
        0.32799969706000004,
        0.34776937406,
        0.32663721606,
        0.43171757506,
        0.36538039506000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.33105152006000005,
      "stddev": 0.012072770309717984,
      "median": 0.32721813806,
      "user": 0.21140983999999996,
      "system": 0.59359154,
      "min": 0.32034188306000005,
      "max": 0.36017592306,
      "times": [
        0.32836788906000003,
        0.32034188306000005,
        0.32565730506,
        0.34355527406,
        0.32931893806000007,
        0.32199681406,
        0.32424682306,
        0.36017592306,
        0.32606838706,
        0.33078596406000005
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 454.5 ± 45.3 408.2 554.0 4.94 ± 0.51
pacquet@main 500.2 ± 47.1 429.8 564.7 5.44 ± 0.54
pnpr@HEAD 95.9 ± 4.4 89.5 107.1 1.04 ± 0.06
pnpr@main 91.9 ± 2.6 88.3 102.8 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.4544572307,
      "stddev": 0.045330056280085206,
      "median": 0.44269030600000003,
      "user": 0.43818528,
      "system": 0.07566031999999999,
      "min": 0.4081887745,
      "max": 0.5540191725,
      "times": [
        0.4648604705,
        0.44441958150000005,
        0.45766963450000003,
        0.42052160350000006,
        0.4081887745,
        0.4337863865,
        0.41318707950000005,
        0.4409610305,
        0.5069585735000001,
        0.5540191725
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5002414413,
      "stddev": 0.04712566323417656,
      "median": 0.5188480799999999,
      "user": 0.4806683799999999,
      "system": 0.08233272,
      "min": 0.42978076750000005,
      "max": 0.5647099775000001,
      "times": [
        0.4364798985,
        0.5211185765,
        0.5204178705,
        0.47264869750000005,
        0.46279367350000006,
        0.5553622485,
        0.5172782895,
        0.5647099775000001,
        0.5218244135000001,
        0.42978076750000005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09594462733870968,
      "stddev": 0.0044202789363791215,
      "median": 0.09555461850000001,
      "user": 0.024622273548387096,
      "system": 0.013568136129032259,
      "min": 0.0895313685,
      "max": 0.10713426150000001,
      "times": [
        0.09045710750000001,
        0.09677147550000001,
        0.1008617025,
        0.1003464545,
        0.1010463795,
        0.1036845285,
        0.0979096945,
        0.0999911165,
        0.0978493305,
        0.0956818675,
        0.1020901515,
        0.0972454865,
        0.0952072055,
        0.0990909845,
        0.0937566885,
        0.09555461850000001,
        0.10713426150000001,
        0.0941757775,
        0.0930276595,
        0.0990175365,
        0.0947320015,
        0.0958658335,
        0.0900865605,
        0.0910125415,
        0.0913547145,
        0.09199507750000001,
        0.0923919035,
        0.0901375665,
        0.0925036345,
        0.0895313685,
        0.0937722185
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09193195985483868,
      "stddev": 0.0026241034245832427,
      "median": 0.0918439145,
      "user": 0.024544725161290328,
      "system": 0.00963063677419355,
      "min": 0.0883182975,
      "max": 0.1027777445,
      "times": [
        0.0918234155,
        0.0911395195,
        0.0935263465,
        0.0893747025,
        0.09253844950000001,
        0.1027777445,
        0.0952205595,
        0.0906624135,
        0.0907241795,
        0.09263579250000001,
        0.0931141515,
        0.0946118765,
        0.0910971415,
        0.0932730205,
        0.0895604815,
        0.0883182975,
        0.0924416275,
        0.0901715815,
        0.0884823455,
        0.0919531885,
        0.0929375595,
        0.0907341285,
        0.0918439145,
        0.0925532875,
        0.0928403065,
        0.0906492485,
        0.0909689285,
        0.09115008050000001,
        0.0884080075,
        0.0923671875,
        0.0919912715
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.762 ± 0.132 4.618 5.074 1.28 ± 0.06
pacquet@main 4.599 ± 0.088 4.501 4.720 1.24 ± 0.05
pnpr@HEAD 3.726 ± 0.153 3.535 3.949 1.00 ± 0.06
pnpr@main 3.709 ± 0.140 3.574 4.014 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.761942149139999,
      "stddev": 0.13246110819204282,
      "median": 4.71922421344,
      "user": 2.39647142,
      "system": 1.8027642599999996,
      "min": 4.61840173744,
      "max": 5.07389129144,
      "times": [
        4.90565135444,
        5.07389129144,
        4.70527533644,
        4.71548858144,
        4.61840173744,
        4.67471013944,
        4.77039124244,
        4.733845855439999,
        4.72295984544,
        4.69880610744
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.59894299574,
      "stddev": 0.08764086918851278,
      "median": 4.58227934794,
      "user": 2.23123072,
      "system": 1.7104662599999998,
      "min": 4.501163818439999,
      "max": 4.7204233124399995,
      "times": [
        4.58176702244,
        4.5130985704399995,
        4.69732454444,
        4.7204233124399995,
        4.5222225394399995,
        4.70094642544,
        4.58279167344,
        4.501163818439999,
        4.51232771144,
        4.65736433944
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.72646813344,
      "stddev": 0.15335305420132,
      "median": 3.67209380894,
      "user": 1.77161402,
      "system": 1.77959046,
      "min": 3.53514946144,
      "max": 3.9494015794400004,
      "times": [
        3.53514946144,
        3.5851536684400003,
        3.9494015794400004,
        3.5886300614400004,
        3.9127382894400005,
        3.6497446214400004,
        3.9168916374400005,
        3.6570218104400003,
        3.7827843974400004,
        3.68716580744
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.7090050105400003,
      "stddev": 0.14013857366579877,
      "median": 3.6519122364400003,
      "user": 1.7418996200000003,
      "system": 1.6294430599999998,
      "min": 3.57419076744,
      "max": 4.01357685944,
      "times": [
        3.70078291144,
        4.01357685944,
        3.6158779564400003,
        3.80064374844,
        3.5829319414400005,
        3.65394286244,
        3.64179388944,
        3.64988161044,
        3.57419076744,
        3.8564275584400005
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13433
Testbedpacquet

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
717.91 ms
(+22.11%)Baseline: 587.91 ms
705.50 ms
(101.76%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,945.35 ms
(+7.14%)Baseline: 2,749.03 ms
3,298.84 ms
(89.28%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,952.62 ms
(+2.39%)Baseline: 1,907.09 ms
2,288.51 ms
(85.32%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
717.91 ms
(+22.11%)Baseline: 587.91 ms
705.50 ms
(101.76%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
408.19 ms
(+12.31%)Baseline: 363.45 ms
436.14 ms
(93.59%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,389.18 ms
(+0.78%)Baseline: 2,370.60 ms
2,844.72 ms
(83.99%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,618.40 ms
(+4.15%)Baseline: 4,434.27 ms
5,321.13 ms
(86.79%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
261.50 ms
(+2.53%)Baseline: 255.05 ms
306.06 ms
(85.44%)
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit f0d6343 into main Jul 27, 2026
34 of 35 checks passed
@zkochan
zkochan deleted the test-vercel2 branch July 27, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants