Repository navigation
bench: size-only encoding benchmark and wire-size sweeps - #136
Merged
Merged
Conversation
--sizes-only skips the timing run and prints the four size columns, after checking that each PDU decodes and re-encodes to the same bytes. --no-timestamp zeroes Pdu::timestamp so the optional E3-PDU envelope timestamp stays off the wire. DAppReport and XAppControlAction samples now set sequence_id = 1: the field is mandatory with range 1..4294967295, and the zero sample made the APER encoder fail on both. It is counted in info_bytes. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Thecave3 <thecave003@gmail.com>
test_bench_encoding_wire measures sizes only, one mode per run: payload size sweep, min/typical/max and one-parameter value sweeps, APER differential field costs, the sizes of the E2SM-DAPP elements built from the golden fixtures, and a dump of the encoded PDUs for offline parsing and compression. Every PDU is decoded and re-encoded and a byte mismatch is reported. PDUs the encoder rejects are written as NA. It links libe3::e2sm_dapp when that target exists. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Thecave3 <thecave003@gmail.com>
Contributor
CI report —
|
| Workflow | Result | Time | Run |
|---|---|---|---|
| Build libe3py wheels | ✅ success | 13m10s | #42 |
| Commit policy | ✅ success | 3m31s | #207 |
| Docs | ✅ success | 0m36s | #14 |
| E2E dApp Integration | ✅ success | 5m30s | #196 |
| E2E Topologies (multi-dApp / multi-RAN) | ✅ success | 3m38s | #194 |
| Full-loop Latency Benchmark | ✅ success | 2m12s | #195 |
| Unit Tests | ✅ success | 6m49s | #222 |
| latrec portability | ⏭️ not triggered (paths filter) | — | — |
| MPMC Queue Benchmark | ⏭️ not triggered (paths filter) | — | — |
E2E Topologies (multi-dApp / multi-RAN)
zmq/ipc
- ✅ 1 RAN - 1 dApp: indications=
5dapppeer=t11 ran=ran-solo sub=1 indications=5 seq=[0..4] dropped=0 (0%) age_ms(avg=0 max=0 @seq=0) hist[<=1:5 2-5:0 6-10:0 >10:0]
- ✅ 1 RAN - 2 dApps: dApp#1 ind=
5sub=1, dApp#2 ind=6sub=2, RAN saw2dApps - ✅ 2 RANs - 1 dApp: from ran-a ind=
5, from ran-b ind=5
zmq/tcp
- ✅ 1 RAN - 1 dApp: indications=
5dapppeer=default ran=ran-solo sub=1 indications=5 seq=[0..4] dropped=0 (0%) age_ms(avg=0.2 max=1 @seq=0) hist[<=1:5 2-5:0 6-10:0 >10:0]
- ✅ 1 RAN - 2 dApps: dApp#1 ind=
5sub=1, dApp#2 ind=6sub=2, RAN saw2dApps - ✅ 2 RANs - 1 dApp: from ran-a ind=
5, from ran-b ind=5
E2E dApp Integration
✅ posix/ipc
- dApp exit:
0 - Indications received:
7
✅ posix/tcp
- dApp exit:
0 - Indications received:
7
✅ zmq/ipc
- dApp exit:
0 - Indications received:
7
✅ zmq/tcp
- dApp exit:
0 - Indications received:
7
Full-loop Latency Benchmark
Full-loop latency
Full-loop latency benchmark (N=1051 after 50 warmup)
All values in microseconds (μs). Link: zmq, transport: ipc, encoding: ASN.1 APER.
| # | Description | Tags | mean | p50 | p99 | max |
|---|---|---|---|---|---|---|
| 1 | Collect indication data | RECORD_BEGIN to ENCODE_E3SM_BEGIN |
0.19 | 0.09 | 0.21 | 13.47 |
| 2 | Create & encode indication | ENCODE_E3SM_BEGIN to ENCODE_E3SM_DONE |
0.85 | 0.53 | 13.28 | 30.25 |
| 3 | Encode E3AP (indication) | EMIT_ENTER to ENQUEUE, then DEQUEUE to ENCODE_E3AP_DONE |
2.41 | 1.97 | 13.57 | 16.73 |
| 4 | Queuing (indication) | ENQUEUE to DEQUEUE |
6.47 | 4.15 | 21.68 | 43.73 |
| 5 | Delivery (indication) | ENCODE_E3AP_DONE to SEND_DONE |
0.92 | 0.37 | 10.78 | 18.21 |
| 6 | E3 wire (RAN -> dApp) | SEND_DONE to RECV |
40.54 | 38.01 | 69.87 | 526.46 |
| 7 | Decode E3AP (indication) | RECV to DECODE_E3AP_DONE |
1.30 | 0.93 | 10.28 | 14.95 |
| 8 | libe3 dispatch (indication) | DECODE_E3AP_DONE to DELIVER_BEGIN |
0.13 | 0.07 | 0.27 | 21.81 |
| 9 | Decode indication | DELIVER_BEGIN to DECODE_E3SM_DONE |
0.30 | 0.25 | 0.58 | 13.52 |
| 10 | Process data | DECODE_E3SM_DONE to ENCODE_E3SM_BEGIN |
0.03 | 0.02 | 0.05 | 5.16 |
| 11 | Create & encode control | ENCODE_E3SM_BEGIN to ENCODE_E3SM_DONE |
0.21 | 0.18 | 0.42 | 13.32 |
| 12 | Encode E3AP (control) | EMIT_ENTER to ENQUEUE, then DEQUEUE to ENCODE_E3AP_DONE |
1.98 | 1.72 | 9.56 | 24.68 |
| 13 | Queuing (control) | ENQUEUE to DEQUEUE |
10.67 | 9.48 | 23.46 | 31.51 |
| 14 | Delivery (control) | ENCODE_E3AP_DONE to SEND_DONE |
5.50 | 3.87 | 17.75 | 24.79 |
| 15 | E3 wire (dApp -> RAN) | SEND_DONE to RECV |
36.96 | 36.18 | 61.56 | 191.52 |
| 16 | Decode E3AP (control) | RECV to DECODE_E3AP_DONE |
2.06 | 1.43 | 14.77 | 19.39 |
| 17 | libe3 dispatch (control) | DECODE_E3AP_DONE to DECODE_E3SM_BEGIN |
0.31 | 0.21 | 0.61 | 18.10 |
| 18 | Decode & handle control | DECODE_E3SM_BEGIN to DECODE_E3SM_DONE |
0.17 | 0.16 | 0.39 | 0.61 |
| Total | Total round-trip | 111.62 | 109.13 | 152.99 | 815.09 |
ubuntu-latest, Release build, ZMQ + IPC, ASN.1 APER.
These numbers are measured inside a GitHub Actions container and should be treated as an upper bound on E3AP's and the library's own latency, not a representative deployment measurement.
Ready to merge (fast-forward only)
A maintainer can land the reviewed commits with:
git fetch origin
git checkout main && git merge --ff-only 6d97ab44932d094916cb7083105b1a282609a808 && git push origin mainHead: 6d97ab44932d094916cb7083105b1a282609a808 (branch bench/encoding-wire-size). If --ff-only fails as non-fast-forward, the branch must be rebased on the latest main.
One comment per PR, rewritten in place once every workflow for
6d97ab4finished.
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.
Summary
test_bench_encoding_sizegains--sizes-only(no timing; each PDU is decoded and re-encoded and a byte mismatch is reported) and--no-timestamp(leaves the optional E3-PDU envelope timestamp off the wire). Its DAppReport and XAppControlAction samples now setsequence_id = 1: the field is mandatory with range 1..4294967295, and the zero sample made the APER encoder fail on both.test_bench_encoding_wiremeasures sizes only, one mode per run:--payload(wire size against opaque payload size),--values(min/typical/max per PDU and one-parameter sweeps over ids, id-list lengths, RAN function count and optional-field presence),--fields(APER cost per field group by differential encoding),--e2sm(E2SM-DAPP element sizes around an E3 payload, and the size of each golden vector) and--dump(the encoded PDUs, for offline parsing and compression). No sockets and no timing.NA. This shows that the APER encoder cannot encode a PDU larger than its fixed 65,536-byte output buffer (for example a SetupResponse with 60 or more functions of 256 + 256 ids, orranFunctionDataof about 65,500 bytes), while protobuf and JSON can. That limit is not changed here and will be filed separately.Type of change
Twin-repo coordination
docs/interop.md.Paired PR(s): none, tests and CMake only.
Local checks
origin/main(af98e5c), linear, no merge commits.libe3-dev:24.04(aarch64):ctestpasses 43/43, includingtest_bench_encoding_wire(runs--values) andtest_bench_encoding_size. The build was made on 75c4e1c; the one commit since then only changes.github/scripts/detect_code_changes.sh.python3 scripts/check_commit_trailers.py --base origin/main --head HEADpasses.