test(amber): cover websocket session state - #7157
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 544 | 0.332 | 17,217/26,538/26,538 us | 🔴 +13.1% / 🔴 +63.8% |
| 🔴 | bs=100 sw=10 sl=64 | 1,216 | 0.742 | 83,393/93,447/93,447 us | 🟢 -25.9% / 🟢 +26.0% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,434 | 0.876 | 697,493/838,437/838,437 us | 🔴 +12.8% / 🟢 +44.6% |
Baseline details
Latest main 45b7b20 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 544 tuples/sec | 589 tuples/sec | 765.25 tuples/sec | -7.6% | -28.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.332 MB/s | 0.36 MB/s | 0.467 MB/s | -7.8% | -28.9% |
| bs=10 sw=10 sl=64 | p50 | 17,217 us | 15,220 us | 12,703 us | +13.1% | +35.5% |
| bs=10 sw=10 sl=64 | p95 | 26,538 us | 27,825 us | 16,199 us | -4.6% | +63.8% |
| bs=10 sw=10 sl=64 | p99 | 26,538 us | 27,825 us | 19,557 us | -4.6% | +35.7% |
| bs=100 sw=10 sl=64 | throughput | 1,216 tuples/sec | 1,187 tuples/sec | 965.22 tuples/sec | +2.4% | +26.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.742 MB/s | 0.725 MB/s | 0.589 MB/s | +2.3% | +25.9% |
| bs=100 sw=10 sl=64 | p50 | 83,393 us | 77,114 us | 103,830 us | +8.1% | -19.7% |
| bs=100 sw=10 sl=64 | p95 | 93,447 us | 126,179 us | 110,778 us | -25.9% | -15.6% |
| bs=100 sw=10 sl=64 | p99 | 93,447 us | 126,179 us | 118,713 us | -25.9% | -21.3% |
| bs=1000 sw=10 sl=64 | throughput | 1,434 tuples/sec | 1,412 tuples/sec | 992.33 tuples/sec | +1.6% | +44.5% |
| bs=1000 sw=10 sl=64 | MB/s | 0.876 MB/s | 0.862 MB/s | 0.606 MB/s | +1.6% | +44.6% |
| bs=1000 sw=10 sl=64 | p50 | 697,493 us | 722,815 us | 1,016,959 us | -3.5% | -31.4% |
| bs=1000 sw=10 sl=64 | p95 | 838,437 us | 743,123 us | 1,062,501 us | +12.8% | -21.1% |
| bs=1000 sw=10 sl=64 | p99 | 838,437 us | 743,123 us | 1,082,611 us | +12.8% | -22.6% |
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,367.56,200,128000,544,0.332,17217.40,26537.61,26537.61
1,100,10,64,20,1644.92,2000,1280000,1216,0.742,83393.28,93446.51,93446.51
2,1000,10,64,20,13942.78,20000,12800000,1434,0.876,697492.71,838437.00,838437.00
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7157 +/- ##
============================================
+ Coverage 79.62% 80.64% +1.02%
- Complexity 3836 3908 +72
============================================
Files 1160 1160
Lines 46188 46188
Branches 5145 5145
============================================
+ Hits 36777 37249 +472
+ Misses 7778 7275 -503
- Partials 1633 1664 +31
*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:
|
There was a problem hiding this comment.
Pull request overview
Adds a new Amber unit-test spec to validate server-side websocket session state behavior, aligning with the Amber web layer’s SessionState responsibilities (event delivery + workflow-service subscription lifecycle + session registry + computing-unit privilege state).
Changes:
- Introduces
SessionStateSpeccovering websocket JSON event serialization viaSessionState.send. - Adds coverage for workflow-service subscription replacement / cleanup via
SessionState.subscribe+unsubscribe. - Adds coverage for session registry operations (
setState/getState/removeState) and computing-unit access state behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
What changes were proposed in this PR?
Adds focused unit coverage for websocket event delivery, workflow-service subscription replacement and cleanup, session-map removal, and computing-unit access state.
Any related issues, documentation, discussions?
Closes #7153
How was this PR tested?
WorkflowExecutionService/testOnly org.apache.texera.web.SessionStateSpec— 3 succeeded.WorkflowExecutionService/Test/scalafmtCheckandWorkflowExecutionService/Test/scalafix --check.Mutation proof:
Each mutation was reverted before the final green test run.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)