Skip to content

test(pm): cover resolver demand mainloop#3049

Draft
elrrrrrrr wants to merge 1 commit into
perf/pm-split-resolver-demand-mainloopfrom
perf/pm-split-resolver-mainloop-tests
Draft

test(pm): cover resolver demand mainloop#3049
elrrrrrrr wants to merge 1 commit into
perf/pm-split-resolver-demand-mainloopfrom
perf/pm-split-resolver-mainloop-tests

Conversation

@elrrrrrrr
Copy link
Copy Markdown
Contributor

Summary

  • add focused unit coverage for demand/preload queue priority and promotion
  • cover manifest state cache updates, waiter wakeups, speculative full-manifest extracts, and transitive prefetch enqueueing
  • add a regression test for non-semver exact-version extraction single-flight behavior

Validation

  • cargo fmt
  • cargo check -p utoo-ruborist
  • cargo test -p utoo-ruborist resolver::builder::tests::test_fetch_queues -- --nocapture
  • cargo test -p utoo-ruborist resolver::builder::tests::test_apply_fetch_result -- --nocapture
  • cargo test -p utoo-ruborist resolver::builder::tests::test_non_semver_exact_version_extract_single_flight -- --nocapture
  • cargo test -p utoo-ruborist resolver::builder::tests::test_enqueue_version -- --nocapture
  • cargo test -p utoo-ruborist resolver::builder::tests::test_schedule_registry_fetch_dedupes_semver_request -- --nocapture
  • cargo clippy --all-targets -- -D warnings --no-deps

Split Plan

This is split out of #3043 so the behavior switch PR stays focused on implementation while the detailed demand-mainloop coverage is reviewed separately.

@elrrrrrrr elrrrrrrr added A-Pkg Manager Area: Package Manager benchmark Run pm-bench on PR labels May 21, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive suite of unit tests for the resolver's manifest fetching and caching logic in crates/ruborist/src/resolver/builder.rs. These tests cover job deduping, priority handling (Demand vs. Prefetch), concurrency limits, and caching behavior for both exact versions and full manifests. A CountingRegistry mock was also added to facilitate tracking of manifest jobs during testing. I have no feedback to provide.

@elrrrrrrr elrrrrrrr force-pushed the perf/pm-split-resolver-demand-mainloop branch from 2948997 to c4361f4 Compare May 21, 2026 22:32
@elrrrrrrr elrrrrrrr force-pushed the perf/pm-split-resolver-mainloop-tests branch 2 times, most recently from 5acdc80 to 286856e Compare May 21, 2026 23:09
@elrrrrrrr elrrrrrrr force-pushed the perf/pm-split-resolver-demand-mainloop branch from c4361f4 to 13bb300 Compare May 21, 2026 23:09
@elrrrrrrr elrrrrrrr force-pushed the perf/pm-split-resolver-mainloop-tests branch from 286856e to f8cd7ab Compare May 21, 2026 23:39
@github-actions
Copy link
Copy Markdown

📊 pm-bench-phases · f76f055 · linux (ubuntu-latest)

Workflow run — ant-design

PMs: utoo (this branch) · utoo-npm (latest published) · bun (latest)

npmjs.org

p0_full_cold

PM wall ±σ user sys RSS pgMinor
bun 7.54s 0.93s 10.31s 6.15s 669M 298.8K
utoo-next 7.35s 1.54s 10.59s 7.85s 984M 130.4K
utoo-npm 7.51s 1.45s 10.84s 8.07s 1.01G 119.7K
utoo 6.78s 0.13s 11.47s 7.90s 959M 146.0K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 17.2K 17.6K 1.19G 6M 1.86G 1.75G 1M
utoo-next 138.1K 93.7K 1.16G 5M 1.71G 1.70G 2M
utoo-npm 152.7K 106.8K 1.16G 5M 1.71G 1.70G 2M
utoo 125.4K 67.7K 1.16G 6M 1.71G 1.70G 2M

p1_resolve

PM wall ±σ user sys RSS pgMinor
bun 2.02s 0.03s 4.43s 0.77s 527M 165.6K
utoo-next 2.85s 0.15s 5.35s 1.20s 612M 87.7K
utoo-npm 2.83s 0.04s 5.54s 1.44s 617M 78.6K
utoo 2.24s 0.07s 6.11s 1.15s 651M 123.7K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 9.8K 4.8K 203M 3M 107M - 1M
utoo-next 55.3K 71.8K 199M 2M 7M 3M 2M
utoo-npm 80.6K 92.8K 200M 2M 7M 3M 2M
utoo 16.0K 17.9K 202M 3M 7M 3M 2M

p3_cold_install

PM wall ±σ user sys RSS pgMinor
bun 5.34s 0.13s 5.89s 6.08s 592M 197.4K
utoo-next 6.29s 2.06s 4.91s 6.91s 540M 60.5K
utoo-npm 6.77s 2.52s 4.98s 6.92s 529M 64.1K
utoo 4.82s 0.40s 4.91s 6.78s 474M 62.2K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 6.3K 6.2K 1019M 4M 1.76G 1.76G 1M
utoo-next 126.1K 53.5K 990M 3M 1.70G 1.70G 2M
utoo-npm 131.4K 47.2K 990M 4M 1.70G 1.70G 2M
utoo 119.7K 49.8K 989M 3M 1.70G 1.70G 2M

p4_warm_link

PM wall ±σ user sys RSS pgMinor
bun 2.11s 0.05s 0.14s 1.17s 134M 32.8K
utoo-next 1.84s 0.03s 0.48s 2.33s 78M 18.4K
utoo-npm 1.80s 0.09s 0.48s 2.35s 79M 18.4K
utoo 1.90s 0.25s 0.48s 2.32s 79M 18.7K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 238 15 5M 19K 1.91G 1.75G 1M
utoo-next 42.1K 18.6K 7K 11K 1.70G 1.70G 2M
utoo-npm 42.7K 18.3K 4K 9K 1.70G 1.70G 2M
utoo 42.7K 17.9K 2K 5K 1.71G 1.70G 2M

npmmirror.com: no output captured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Pkg Manager Area: Package Manager benchmark Run pm-bench on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant