Better nar restorer, and ref scanning#1068
Conversation
Callers no longer pay the `spawn_blocking` + `SyncIoBridge` penalty per NAR entry. The `Sink`-based API is replaced with a simpler `restore` method that consumes a stream of `NarEvent`s directly. Co-authored-by: Amaan Qureshi <git@amaanq.com>
Add a new `harmonia-store-ref-scan` crate with a streaming `RefScanSink` (Boyer-Moore-style window over the nix-base32 alphabet) for post-build reference discovery without a second disk walk. Co-authored-by: Amaan Qureshi <git@amaanq.com>
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR introduces Possibly related PRs
Note: Chuck Norris doesn't refactor code—the code refactors itself out of respect when Chuck Norris enters the repository. In this case, async I/O bows before his async-first sensibilities, and streaming scanners simply know their windows are valid because Chuck Norris validates them with a glance. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1068 +/- ##
==========================================
+ Coverage 64.97% 65.27% +0.30%
==========================================
Files 149 150 +1
Lines 17006 17138 +132
Branches 17006 17138 +132
==========================================
+ Hits 11049 11187 +138
+ Misses 5304 5295 -9
- Partials 653 656 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| Branch | scanner |
| Testbed | github-actions |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| closure/download | 📈 view plot | 2,786.10 ms |
| http/concurrent_16_identity | 📈 view plot | 206.52 ms |
| http/concurrent_16_zstd | 📈 view plot | 1,148.70 ms |
| http/concurrent_4_identity | 📈 view plot | 228.72 ms |
| http/concurrent_4_zstd | 📈 view plot | 1,314.40 ms |
| http/sequential_identity | 📈 view plot | 502.01 ms |
| http/sequential_zstd | 📈 view plot | 2,469.50 ms |
| narinfo/all | 📈 view plot | 6.19 ms |
|
| Branch | main |
| Testbed | github-actions |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Lower Boundary milliseconds (ms) (Limit %) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|---|
| closure/download | 📈 view plot 🚷 view threshold | 2,627.70 ms(-0.68%)Baseline: 2,645.56 ms | 2,513.27 ms (95.65%) | 2,777.85 ms (94.59%) |
| http/concurrent_16_identity | 📈 view plot 🚷 view threshold | 205.81 ms(+2.66%)Baseline: 200.48 ms | 186.98 ms (90.85%) | 213.99 ms (96.18%) |
| http/concurrent_16_zstd | 📈 view plot 🚷 view threshold | 1,137.00 ms(+0.42%)Baseline: 1,132.22 ms | 1,074.87 ms (94.54%) | 1,189.57 ms (95.58%) |
| http/concurrent_4_identity | 📈 view plot 🚷 view threshold | 224.65 ms(+2.75%)Baseline: 218.64 ms | 203.12 ms (90.42%) | 234.16 ms (95.94%) |
| http/concurrent_4_zstd | 📈 view plot 🚷 view threshold | 1,289.80 ms(+0.05%)Baseline: 1,289.11 ms | 1,218.33 ms (94.46%) | 1,359.90 ms (94.85%) |
| http/sequential_identity | 📈 view plot 🚷 view threshold | 454.70 ms(-1.61%)Baseline: 462.13 ms | 420.47 ms (92.47%) | 503.78 ms (90.26%) |
| http/sequential_zstd | 📈 view plot 🚷 view threshold | 2,408.90 ms(+0.01%)Baseline: 2,408.74 ms | 2,276.64 ms (94.51%) | 2,540.84 ms (94.81%) |
| narinfo/all | 📈 view plot 🚷 view threshold | 7.10 ms(+11.81%)Baseline: 6.35 ms | 5.59 ms (78.76%) | 7.11 ms (99.88%) |
|
@Ericson2314, shouldn't this stuff use capstd ideally? (As a long-term goal) |
|
@xokdvium yes see bytecodealliance/cap-std#414 and #1031 |
|
This is stuff from @Mic92 I am basically doing as is. I hope it could help with rio dedup. |
No description provided.