test(pyamber): close the schema, table, proxy and network-sender gaps - #8067
Open
aglinxinyuan wants to merge 1 commit into
Open
test(pyamber): close the schema, table, proxy and network-sender gaps#8067aglinxinyuan wants to merge 1 commit into
aglinxinyuan wants to merge 1 commit into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8067 +/- ##
============================================
+ Coverage 93.51% 93.54% +0.03%
Complexity 4709 4709
============================================
Files 1181 1181
Lines 47809 47809
Branches 5327 5327
============================================
+ Hits 44708 44725 +17
+ Misses 1663 1646 -17
Partials 1438 1438
*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:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 538 | 0.328 | 18,650/22,178/22,178 us | 🔴 +23.2% / 🔴 +66.9% |
| 🔴 | bs=100 sw=10 sl=64 | 1,171 | 0.715 | 85,477/101,469/101,469 us | 🟢 -20.8% / 🔴 +6.7% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,401 | 0.855 | 712,629/797,783/797,783 us | 🔴 +8.4% / 🟢 -18.6% |
Baseline details
Latest main bdc6d2a from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 538 tuples/sec | 570 tuples/sec | 893.99 tuples/sec | -5.6% | -39.8% |
| bs=10 sw=10 sl=64 | MB/s | 0.328 MB/s | 0.348 MB/s | 0.546 MB/s | -5.7% | -39.9% |
| bs=10 sw=10 sl=64 | p50 | 18,650 us | 15,132 us | 11,176 us | +23.2% | +66.9% |
| bs=10 sw=10 sl=64 | p95 | 22,178 us | 28,561 us | 14,009 us | -22.3% | +58.3% |
| bs=10 sw=10 sl=64 | p99 | 22,178 us | 28,561 us | 16,898 us | -22.3% | +31.2% |
| bs=100 sw=10 sl=64 | throughput | 1,171 tuples/sec | 1,127 tuples/sec | 1,157 tuples/sec | +3.9% | +1.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.715 MB/s | 0.688 MB/s | 0.706 MB/s | +3.9% | +1.2% |
| bs=100 sw=10 sl=64 | p50 | 85,477 us | 80,485 us | 88,763 us | +6.2% | -3.7% |
| bs=100 sw=10 sl=64 | p95 | 101,469 us | 128,196 us | 95,096 us | -20.8% | +6.7% |
| bs=100 sw=10 sl=64 | p99 | 101,469 us | 128,196 us | 102,854 us | -20.8% | -1.3% |
| bs=1000 sw=10 sl=64 | throughput | 1,401 tuples/sec | 1,443 tuples/sec | 1,187 tuples/sec | -2.9% | +18.1% |
| bs=1000 sw=10 sl=64 | MB/s | 0.855 MB/s | 0.881 MB/s | 0.724 MB/s | -3.0% | +18.0% |
| bs=1000 sw=10 sl=64 | p50 | 712,629 us | 691,280 us | 874,968 us | +3.1% | -18.6% |
| bs=1000 sw=10 sl=64 | p95 | 797,783 us | 735,719 us | 917,815 us | +8.4% | -13.1% |
| bs=1000 sw=10 sl=64 | p99 | 797,783 us | 735,719 us | 949,868 us | +8.4% | -16.0% |
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,371.77,200,128000,538,0.328,18650.25,22178.00,22178.00
1,100,10,64,20,1707.48,2000,1280000,1171,0.715,85476.53,101468.94,101468.94
2,1000,10,64,20,14276.97,20000,12800000,1401,0.855,712629.22,797782.97,797782.97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Seven pyamber files, five existing specs extended and two new ones added. +15 fully-covered lines; six of the seven files reach 100%.
handlers/control/open_executor_handler.pymodels/schema/schema.pymodels/schema/attribute_type.pymodels/table.pyproxy/proxy_client.pyrunnables/network_sender.pystorage/iceberg/iceberg_utils.pyNo file here is worth a PR alone — each carries two or three lines. The bundle total is the point, and it is stated that way rather than dressed up per file.
iceberg_utils.pycloses lines 239 and 275; its remaining 302–303 are already green in CI and worth zero. The local figure of 4 missed is a local-environment artefact, which is why the honest CI-equivalent gain is +15 and not +17.Tests across the seven files go 37 → 89.
A measurement trap worth recording
This machine cannot run the Iceberg-backed tests — the postgres
texerarole cannot readiceberg_tables— so a raw local coverage run under-reports. An earlier assessment of one of these files measured 12 missed lines locally where Codecov showed 2, wrong by 6×. Every target here was sized from Codecov and the local numbers were used only for the delta, never for the ceiling.Dead production code found, and deliberately not pinned
attribute_type.py:96-97normalises a trailingZbefore callingdatetime.fromisoformat. Deleting the whole block leaves the suite byte-identical. That is not a coverage gap —fromisoformathas acceptedZsince Python 3.11, and the CI matrix is 3.11/3.12/3.13, so the block is dead on every interpreter the project runs. A 10-case differential probe confirmed it.No test was written to pin it. The test that had been named after that branch was renamed and annotated, so nothing in the suite claims to constrain a branch that cannot be reached.
Verification
27 mutations, 26 killed, 1 equivalent — the equivalent one being the dead block above. Each was applied one at a time against a tree verified hash-equal to a snapshot, reverted from that snapshot rather than from git.
Two adversarial reviewers returned nine findings against the first draft; all repaired, adding six further tests.
Measured with
--cov=src/main/pythonunder the exact marker filter CI uses (-m "not integration"), no name filter, identical on both sides. The before-state restored each tracked spec by exact single file path viagit show HEAD:<path>and moved the two new specs aside; all seven were then restored from a scratch snapshot and md5-verified.Full pyamber suite:
5 failed, 1269 passed, 7 errors, with theFAILED/ERRORset identical by identity to main's 12 entries — no regression.ruff checkandruff format --checkpass on CI's exact scope (src/main/python src/test/python). Both new spec files carry the Apache licence header.No production file is touched;
git diff -- 'amber/src/main/*'is empty.Any related issues, documentation, discussions?
Closes #8065
How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)