Repository navigation
Conversation
oracle/latency.c is one C program for the C ABI. It runs as an outlet or as an inlet, and reads its own CLOCK_MONOTONIC. oracle/latency.py links it to each library, runs each pair more than once, and makes a table. Each row names the library that the loader picked. With --control, a known delay of 1000 us must show in the table. docs/latency.md gives the method and the first results for liblsl, main, fix/network-robustness and perf/quick-wins. At 4000 Hz x 64 channels in chunks of 32, main uses 9 to 11 % CPU on each side. The fix branch uses 2 to 3 %, near liblsl.
docs/extensions.md proposes the request header Labstream-Features. A labstream outlet answers it, and liblsl ignores it on both sides. The page gives the syntax, the rules, the byte where a feature can change the framing, the first features (seq and shm), the rejected alternatives, and the conformance plan. Nothing is implemented. oracle/headerprobe.py sends a feed request with and without the header to a real outlet. The answer headers and the test pattern must be the same. It passes for liblsl and for labstream main. A probe with a known header (Native-Byte-Order) shows a difference, so the probe can fail.
2 tasks
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
Two additions. No library code changes.
conformance/oracle/latency.c,latency.py,docs/latency.md). One C program for the C ABI runs as an outlet or as an inlet, and links to liblsl or to labstream. It stamps each sample with its ownCLOCK_MONOTONICat the push, so no row depends on a library clock. Each row names the library that the loader picked.--controladds a known delay of 1000 us, and the table must show it (966 us on the run below).docs/extensions.md,conformance/oracle/headerprobe.py). A labstream inlet offersLabstream-Features, and a labstream outlet answers it. liblsl ignores an unknown header on both sides (src/tcp_server.cpp:605-633,src/data_receiver.cpp:215-253). The page gives the syntax, the rules, where the framing can change, sketches forseqandshm, the rejected alternatives, and the conformance plan. Nothing is implemented.First results (loopback, median of 3 runs of 10 s)
mainfix/network-robustness(#9)perf/quick-wins(#10)With a push of one sample, all builds give a median of 70-100 us, like liblsl. No run lost a sample. The full table is in
docs/latency.md.Header probe
oracle/headerprobe.pysends one feed request with the header and one without to a real outlet. The answer headers and the test pattern are the same for liblsl,mainandperf/quick-wins. A copy that sends a known header (Native-Byte-Order: 4321) shows a difference, so the probe can fail.Not done
docs/latency.mdgives a procedure with network namespaces. It was not run, because anetemrule onloslows the whole machine.CHANGELOG.mdentries will conflict with Correct clock start, reconnect, write batching and receive CPU #9 at merge. The fix is small and by hand.🤖 Generated with Claude Code