Add optional [LAT] latency-profiling log points#46
Open
Thecave3 wants to merge 1 commit into
Open
Conversation
Contributor
⏱️ Full-loop Latency Benchmark (commit
|
| Phase | mean | p50 | p99 | max |
|---|---|---|---|---|
| 1. Collect indication data | 0.10 | 0.11 | 0.28 | 1.28 |
| 2. Create & encode indication | 0.52 | 0.45 | 1.22 | 13.34 |
| 3. Deliver indication (RAN -> dApp) | 81.48 | 75.28 | 142.93 | 153.04 |
| 4. Decode indication | 0.31 | 0.25 | 0.94 | 8.73 |
| 5. Process data | 0.02 | 0.02 | 0.03 | 0.13 |
| 6. Create & encode control | 0.22 | 0.17 | 0.60 | 2.81 |
| 7. Deliver control (dApp -> RAN) | 90.17 | 85.82 | 152.12 | 163.68 |
| 8. Decode & handle control | 0.29 | 0.24 | 0.95 | 10.93 |
| Total round-trip | 173.11 | 134.66 | 252.68 | 274.21 |
Benchmarked on
ubuntu-latest, Release build, ZMQ + IPC, ASN.1 APER.
Contributor
🔄 E2E dApp Integration Results (commit
|
Contributor
🔀 E2E Topologies — multi-dApp / multi-RAN (commit
|
Compile-gated log markers on the E3 send/receive/dispatch boundaries so the end-to-end critical path can be measured offline from interleaved logs, without any wire/schema change. - New include/libe3/latency.hpp: E3_LAT / E3_LAT_CLOCK_OFFSET macros emitting a single machine-parseable INFO line ([LAT] stage=<name> t_ns=<monotonic ns> anchor_ns=<producer_ts|0> [k=v ...]). t_ns uses steady_clock (== CLOCK_MONOTONIC on glibc) so it subtracts directly against same-node C timestamps. When disabled the macros collapse to a dead NullLatSink chain (zero cost). - New CMake option LIBE3_ENABLE_LATENCY (default OFF) -> defines LIBE3_LATENCY on both library targets. Gating is the compile switch, not the log level. - e3_interface.cpp: ind_wire_tx (outbound send), ctrl_wire_rx (inbound control off the wire) and ctrl_dispatch (handoff to the SM), plus a per-process clock_offset marker at inbound-loop start for future cross-node alignment.
Thecave3
force-pushed
the
feature/e3ap-latency-instrumentation
branch
from
July 23, 2026 19:52
209dd6d to
a4c1818
Compare
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
Compile-gated
[LAT]log markers on the E3 send / receive / dispatch boundaries, so the end-to-end critical path can be measured offline from interleaved logs — no wire or schema change.How
include/libe3/latency.hpp—E3_LAT/E3_LAT_CLOCK_OFFSETmacros emitting one machine-parseable INFO line:t_nsusessteady_clock(==CLOCK_MONOTONICon glibc), so it subtracts directly against same-node C timestamps. When disabled the macros collapse to a deadNullLatSinkchain (zero cost).LIBE3_ENABLE_LATENCY(defaultOFF) → definesLIBE3_LATENCYon both library targets. Gating is the compile switch, not the log level — a profiling run does not have to raise the logger toDEBUG.src/core/e3_interface.cpp:ind_wire_tx(outbound send),ctrl_wire_rx(inbound control off the wire),ctrl_dispatch(handoff to the SM), plus a per-processclock_offsetmarker at inbound-loop start.Enabling
Testing
Default builds are unaffected (macros expand away). With the option on,
[LAT]lines appear at INFO for each boundary plus oneclock_offsetline at startup.