test(amber): add unit test coverage for FriesReconfigurationAlgorithm - #7578
Conversation
Add FriesReconfigurationAlgorithmSpec covering closure computation around one-to-many operators, connected-component splitting, epoch-marker source selection, and multi-region handling.
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 363 | 0.221 | 26,002/37,967/37,967 us | 🔴 +13.8% / 🔴 +137.4% |
| 🔴 | bs=100 sw=10 sl=64 | 765 | 0.467 | 125,860/174,169/174,169 us | 🔴 +24.8% / 🔴 +61.2% |
| ⚪ | bs=1000 sw=10 sl=64 | 914 | 0.558 | 1,094,344/1,157,512/1,157,512 us | ⚪ within ±5% / 🔴 +11.5% |
Baseline details
Latest main e878df3 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 363 tuples/sec | 404 tuples/sec | 784.3 tuples/sec | -10.1% | -53.7% |
| bs=10 sw=10 sl=64 | MB/s | 0.221 MB/s | 0.247 MB/s | 0.479 MB/s | -10.5% | -53.8% |
| bs=10 sw=10 sl=64 | p50 | 26,002 us | 22,844 us | 12,590 us | +13.8% | +106.5% |
| bs=10 sw=10 sl=64 | p95 | 37,967 us | 33,720 us | 15,991 us | +12.6% | +137.4% |
| bs=10 sw=10 sl=64 | p99 | 37,967 us | 33,720 us | 18,694 us | +12.6% | +103.1% |
| bs=100 sw=10 sl=64 | throughput | 765 tuples/sec | 818 tuples/sec | 1,002 tuples/sec | -6.5% | -23.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.467 MB/s | 0.499 MB/s | 0.612 MB/s | -6.4% | -23.6% |
| bs=100 sw=10 sl=64 | p50 | 125,860 us | 120,327 us | 101,285 us | +4.6% | +24.3% |
| bs=100 sw=10 sl=64 | p95 | 174,169 us | 139,603 us | 108,068 us | +24.8% | +61.2% |
| bs=100 sw=10 sl=64 | p99 | 174,169 us | 139,603 us | 118,235 us | +24.8% | +47.3% |
| bs=1000 sw=10 sl=64 | throughput | 914 tuples/sec | 918 tuples/sec | 1,030 tuples/sec | -0.4% | -11.3% |
| bs=1000 sw=10 sl=64 | MB/s | 0.558 MB/s | 0.56 MB/s | 0.629 MB/s | -0.4% | -11.2% |
| bs=1000 sw=10 sl=64 | p50 | 1,094,344 us | 1,087,270 us | 991,882 us | +0.7% | +10.3% |
| bs=1000 sw=10 sl=64 | p95 | 1,157,512 us | 1,140,726 us | 1,038,496 us | +1.5% | +11.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,157,512 us | 1,140,726 us | 1,068,265 us | +1.5% | +8.4% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,551.38,200,128000,363,0.221,26001.67,37966.62,37966.62
1,100,10,64,20,2613.17,2000,1280000,765,0.467,125860.43,174169.09,174169.09
2,1000,10,64,20,21878.04,20000,12800000,914,0.558,1094344.22,1157512.10,1157512.10
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7578 +/- ##
============================================
- Coverage 87.88% 87.87% -0.02%
+ Complexity 4276 4271 -5
============================================
Files 1176 1176
Lines 47018 47018
Branches 5245 5245
============================================
- Hits 41323 41317 -6
Misses 3972 3972
- Partials 1723 1729 +6
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/request-review @aglinxinyuan |
What changes were proposed in this PR?
The new
FriesReconfigurationAlgorithmSpec(16 tests) pins the algorithm's observable behaviors throughgetReconfigurations, with positive and negative assertions:Fixtures build small regions with
PhysicalOp/PhysicalLinkwiring (the closure walks per-operator port links) and stubWorkflowExecutionManager.getExecutingRegions, following the patterns ofRegionSpecandWorkflowExecutionManagerSpec. No production code is changed.Any related issues, documentation, discussions?
Closes #7573
How was this PR tested?
This PR is itself test-only. The new spec was run with:
All 16 tests pass. The suite was additionally mutation-checked: four manual mutations of the algorithm (dropping forward-closure propagation, disabling the connected-component split, disabling the one-to-many pull-in, and returning whole components instead of intersecting with the source set) each caused multiple test failures, and the source was restored afterwards.
scalafmtCheckpasses.Was this PR authored or co-authored using generative AI tooling?
Co-authored by: Claude Code (Claude Fable 5)