fix: route benchmark registry tarballs through proxy#12257
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (1)pacquet/**/*.rs📄 CodeRabbit inference engine (pacquet/AGENTS.md)
Files:
🧠 Learnings (25)📓 Common learnings📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-20T23:07:58.444ZApplied to files:
📚 Learning: 2026-06-06T18:58:37.156ZApplied to files:
📚 Learning: 2026-06-03T09:27:50.473ZApplied to files:
📚 Learning: 2026-05-19T07:12:00.339ZApplied to files:
📚 Learning: 2026-05-24T08:18:06.019ZApplied to files:
📚 Learning: 2026-06-06T22:48:27.363ZApplied to files:
📚 Learning: 2026-05-20T20:41:30.632ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-18T20:35:22.917ZApplied to files:
📚 Learning: 2026-05-29T18:03:24.797ZApplied to files:
📚 Learning: 2026-05-24T21:11:04.272ZApplied to files:
📚 Learning: 2026-05-29T18:03:24.797ZApplied to files:
📚 Learning: 2026-05-25T14:58:11.105ZApplied to files:
📚 Learning: 2026-05-29T18:03:24.797ZApplied to files:
📚 Learning: 2026-06-04T14:40:29.444ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-06-02T13:18:30.659ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
📚 Learning: 2026-05-29T18:03:15.372ZApplied to files:
🔇 Additional comments (24)
📝 WalkthroughWalkthroughThis PR refactors the latency proxy to accept configurable listen addresses, adds bandwidth conversion, and integrates optional proxy fronting of the benchmark registry with URL advertisement support. The Verdaccio mock registry is conditionally fronted with latency and bandwidth constraints when configured, with split one-way latency and a computed download cap. ChangesBenchmark registry latency/bandwidth proxy integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Micro-Benchmark ResultsLinux |
Review Summary by QodoRoute benchmark registry tarballs through latency proxy
WalkthroughsDescription• Route registry tarball downloads through latency proxy in Verdaccio mode - Previously, packuments were fetched through the proxy but tarball URLs bypassed it - Now, the proxy binds to the public registry port before Verdaccio starts - Verdaccio advertises proxied tarball URLs via configurable --public-url • Add spawn_on method to LatencyProxy for custom listen addresses • Extract mbps_to_bytes_per_sec conversion to latency_proxy module • Separate cache populator registry URL from client registry URL Diagramflowchart LR
A["Verdaccio<br/>upstream port"] -->|"LatencyProxy<br/>spawn_on"| B["Public registry<br/>port"]
C["Packuments"] -->|"advertise via<br/>public_url"| B
D["Tarball URLs"] -->|"now routed<br/>through proxy"| B
B -->|"emulated latency<br/>+ bandwidth"| E["Benchmark clients"]
F["Cache populator"] -->|"direct URL<br/>registry_cache_populator"| A
File Changes1. pacquet/tasks/integrated-benchmark/src/latency_proxy.rs
|
Integrated-Benchmark Report (Linux)Each scenario has pacquet rows (direct install) and pnpr rows (the same client through the pnpr install accelerator), so pnpr@HEAD vs pacquet@HEAD is the pnpr-vs-direct ratio. Cold-store scenarios wipe the client store between runs (warm server); hot-store scenarios keep it warm. The pacquet@HEAD rows feed the pacquet Bencher testbed; the pnpr@HEAD rows feed the pnpr testbed. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 10.033518900839999,
"stddev": 0.30345354684016834,
"median": 9.90727660314,
"user": 3.0263637599999997,
"system": 3.2359478399999992,
"min": 9.87353643564,
"max": 10.85272034164,
"times": [
10.85272034164,
10.13941414264,
9.88063856264,
9.88801182064,
9.93047722064,
9.87353643564,
9.87422967364,
9.87496302164,
10.09465640364,
9.92654138564
]
},
{
"command": "pacquet@main",
"mean": 9.96258733214,
"stddev": 0.08473714400473184,
"median": 9.936965892139998,
"user": 3.09955276,
"system": 3.2670983399999995,
"min": 9.85951104364,
"max": 10.14932624864,
"times": [
9.85951104364,
9.94714717164,
9.92766049164,
9.97236176064,
10.14932624864,
9.946271292639999,
9.920740606639999,
9.92129807564,
9.91247806464,
10.06907856564
]
},
{
"command": "pnpr@HEAD",
"mean": 5.4789763462400005,
"stddev": 0.14026222596409782,
"median": 5.465871871140001,
"user": 2.49565276,
"system": 2.9989997399999995,
"min": 5.3182271526400005,
"max": 5.76164018464,
"times": [
5.76164018464,
5.351703205640001,
5.56444147164,
5.4350003546400005,
5.4967433876400005,
5.3182271526400005,
5.34936963164,
5.569501803640001,
5.572730039640001,
5.3704062306400004
]
},
{
"command": "pnpr@main",
"mean": 5.376191070140001,
"stddev": 0.09247396637412517,
"median": 5.3511288426400005,
"user": 2.44168646,
"system": 2.9384521399999994,
"min": 5.323546754640001,
"max": 5.63523234164,
"times": [
5.32762849764,
5.34977186664,
5.323546754640001,
5.38228321564,
5.352485818640001,
5.34193032864,
5.356595517640001,
5.33992443264,
5.35251192764,
5.63523234164
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.63809734274,
"stddev": 0.010860011714028726,
"median": 0.6394429452399999,
"user": 0.35823035999999997,
"system": 1.3100516,
"min": 0.62387694424,
"max": 0.6533907302399999,
"times": [
0.63706775424,
0.62387694424,
0.64181813624,
0.63442098524,
0.65008787324,
0.64216682624,
0.6533907302399999,
0.62520152624,
0.62496029124,
0.64798236024
]
},
{
"command": "pacquet@main",
"mean": 0.66640631074,
"stddev": 0.06280626967639591,
"median": 0.64871264724,
"user": 0.36528666,
"system": 1.3150287,
"min": 0.6226835562399999,
"max": 0.83318258624,
"times": [
0.64420817724,
0.62842033924,
0.62698857624,
0.83318258624,
0.69148354124,
0.67501500924,
0.65932387224,
0.62954033224,
0.6226835562399999,
0.65321711724
]
},
{
"command": "pnpr@HEAD",
"mean": 0.76356158084,
"stddev": 0.027204866854295715,
"median": 0.75500958424,
"user": 0.38342785999999995,
"system": 1.3110958,
"min": 0.73525655524,
"max": 0.81577511524,
"times": [
0.74598723724,
0.78786106324,
0.77264911224,
0.76216343124,
0.74192113024,
0.81577511524,
0.74785573724,
0.73525655524,
0.78985189224,
0.73629453424
]
},
{
"command": "pnpr@main",
"mean": 0.7344630365399999,
"stddev": 0.013976198376575029,
"median": 0.7332127452399999,
"user": 0.36968056,
"system": 1.3099843999999998,
"min": 0.71841544224,
"max": 0.76712277924,
"times": [
0.73258201224,
0.73581030224,
0.76712277924,
0.74092142324,
0.73384347824,
0.73067648724,
0.71923235124,
0.71841544224,
0.72477112924,
0.74125496024
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 9.234728632579998,
"stddev": 0.055409361377568606,
"median": 9.22211971178,
"user": 3.5702595800000005,
"system": 3.29330912,
"min": 9.160590557779999,
"max": 9.30842817578,
"times": [
9.28623361378,
9.20062954078,
9.30842817578,
9.22371408578,
9.160590557779999,
9.16724937678,
9.19636573178,
9.29573770178,
9.28781220378,
9.22052533778
]
},
{
"command": "pacquet@main",
"mean": 9.20338942518,
"stddev": 0.03466805527144006,
"median": 9.20099970728,
"user": 3.5266604799999994,
"system": 3.2473908199999997,
"min": 9.162718588779999,
"max": 9.28672024678,
"times": [
9.20743845278,
9.196508567779999,
9.28672024678,
9.22356172978,
9.162718588779999,
9.20549084678,
9.208525351779999,
9.19075321978,
9.18187335078,
9.17030389678
]
},
{
"command": "pnpr@HEAD",
"mean": 5.08489146808,
"stddev": 0.035571834891795016,
"median": 5.081262922780001,
"user": 2.2852764800000003,
"system": 2.8291888199999997,
"min": 5.037812333780001,
"max": 5.13185984778,
"times": [
5.12733827078,
5.092226113780001,
5.05307645278,
5.0532104247800005,
5.095462574780001,
5.037812333780001,
5.05768686678,
5.13185984778,
5.0702997317800005,
5.129942063780001
]
},
{
"command": "pnpr@main",
"mean": 5.17523135608,
"stddev": 0.1402656511525214,
"median": 5.11176897328,
"user": 2.27337688,
"system": 2.7985390199999998,
"min": 5.055507154780001,
"max": 5.41291195378,
"times": [
5.055507154780001,
5.06957634178,
5.38118448578,
5.25583402478,
5.060316210780001,
5.05854816078,
5.41291195378,
5.24667542178,
5.15396160478,
5.057798201780001
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.3738334495200002,
"stddev": 0.020637271340427095,
"median": 1.3718409774200002,
"user": 1.53145248,
"system": 1.7591394599999997,
"min": 1.3438143119200001,
"max": 1.40141983592,
"times": [
1.35873140692,
1.3712139869200002,
1.36365494692,
1.37246796792,
1.39853675392,
1.38208995092,
1.40141983592,
1.39719534092,
1.3438143119200001,
1.34920999292
]
},
{
"command": "pacquet@main",
"mean": 1.3908001642200003,
"stddev": 0.018865636949173373,
"median": 1.38695328642,
"user": 1.53874248,
"system": 1.7744262599999998,
"min": 1.36301177692,
"max": 1.42407851492,
"times": [
1.39550019692,
1.38441376992,
1.4199567399200002,
1.42407851492,
1.3837181999200001,
1.39171848292,
1.3739917539200002,
1.38211940392,
1.36301177692,
1.38949280292
]
},
{
"command": "pnpr@HEAD",
"mean": 0.65333799542,
"stddev": 0.012648748475901443,
"median": 0.65057604242,
"user": 0.32653487999999997,
"system": 1.24901216,
"min": 0.63549212992,
"max": 0.67570084492,
"times": [
0.6481037849200001,
0.65304829992,
0.6719622929200001,
0.67570084492,
0.65863051892,
0.6456511289200001,
0.6554550019200001,
0.6430740289200001,
0.6462619229200001,
0.63549212992
]
},
{
"command": "pnpr@main",
"mean": 0.65537732792,
"stddev": 0.009613336237957243,
"median": 0.6522510554200001,
"user": 0.32783878000000005,
"system": 1.25461096,
"min": 0.6444892899200001,
"max": 0.6756269329200001,
"times": [
0.6525250199200001,
0.6444892899200001,
0.6588643349200001,
0.64868058392,
0.6470523729200001,
0.6756269329200001,
0.6499754859200001,
0.66631367892,
0.6519770909200001,
0.6582684889200001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot storeResolution-only: cold packument cache (full re-resolve over the registry link) with a hot store (no tarball download), so this isolates pnpr offloading the client resolution to its warm server.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.954607077780001,
"stddev": 0.024772228472490693,
"median": 4.9514021459799995,
"user": 1.7130627600000001,
"system": 1.8853766,
"min": 4.92484209898,
"max": 5.00656098398,
"times": [
4.95937352398,
4.98302396498,
4.95380724198,
4.92484209898,
4.94899704998,
4.94425827698,
4.934420969980001,
5.00656098398,
4.95937714498,
4.93140952198
]
},
{
"command": "pacquet@main",
"mean": 4.97583450138,
"stddev": 0.035068701137444154,
"median": 4.97434451098,
"user": 1.7113393599999998,
"system": 1.9163934,
"min": 4.91792945198,
"max": 5.05222552698,
"times": [
4.98857811398,
5.05222552698,
4.97343253098,
4.96991076698,
4.9438388809800005,
4.99348626198,
4.91792945198,
4.984273018980001,
4.975256490980001,
4.95941396998
]
},
{
"command": "pnpr@HEAD",
"mean": 0.64764832628,
"stddev": 0.006871138548119515,
"median": 0.64426168048,
"user": 0.32239676,
"system": 1.2523397,
"min": 0.6411507399799999,
"max": 0.66178590798,
"times": [
0.64392515898,
0.64946053598,
0.64279764498,
0.66178590798,
0.64459820198,
0.65171418398,
0.64231048298,
0.65576907498,
0.6411507399799999,
0.64297133098
]
},
{
"command": "pnpr@main",
"mean": 0.6854683962799999,
"stddev": 0.02825248952831989,
"median": 0.67433163398,
"user": 0.3296168599999999,
"system": 1.2743820999999997,
"min": 0.66959122698,
"max": 0.76344144698,
"times": [
0.67586469698,
0.67271393198,
0.67965799898,
0.66959122698,
0.67247217598,
0.76344144698,
0.68775354898,
0.67089417398,
0.68949619098,
0.67279857098
]
}
]
} |
Summary
This fixes the benchmark topology where packuments were fetched through the emulated registry link but dist.tarball URLs still pointed at the raw mock-registry port, so tarball downloads bypassed the benchmark latency/bandwidth proxy.
Tests
Written by an agent (Codex, GPT-5).
Summary by CodeRabbit
New Features
Tests