Measure the voice path through both adapters; test the engine on a registered connector

- A unit test frames 5,000 Opus packets each way through SessionLink, the
  TeamSpeak session and the recording link and prints the cost per packet
  (about 7 microseconds to the host, 10 from it in a debug build; the test
  bounds each direction at 500 microseconds). docs/session-seam.md section 13
  records the figures, which were the one thing slice 1 had not measured.
- tests/session_backends.rs: the engine over voelin-proto's FakeConnector
  through Engine::start_with_backends (connect, server name and backend,
  channels, a move, disconnect), and the registry's error text for an address
  no connector serves.
- The error of a TeamSpeak connector given an address that is not a TeamSpeak
  one no longer prints the query, where a channel password rides.
- The note on the two library tests that need the name localhost to resolve to
  127.0.0.1 says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-21 00:41:04 +03:00
1 parent 1b7abdf4c7
commit bc9ccbc85e
4 files changed
+184 -9

No files matched your search

+16 -5
View File
@@ -843,7 +843,7 @@ Nothing here blocks this half: each has a workaround above.
| The inner bus of `LinkSession` lags and a request never gets its answer. | Capacity 4096, a timeout on every pending request, lag logged. |
| A uid that round-trips through `User.uid` on one side and through `Foreign` on the other (F10) would key contacts and private history differently. | Both sides use one rule (canonical base64 → bytes, anything else → `Foreign`), asserted by the round-trip test on TeamSpeak 3 and 6 uids, ServerQuery login names and the FakeLink fixtures' `alice=`; checked live (contacts and private history keyed by uid). |
| The model crate switch collides with other branches. | 11.3; the switch is manifest-only. |
| Two adapters cost CPU per voice packet (RTP wrap and unwrap in process). | About a hundred bytes copied per 20 ms per talker; measured once in slice 1 against the baseline's CPU with the smoke's voice scenario. |
| Two adapters cost CPU per voice packet (RTP wrap and unwrap in process). | About a hundred bytes copied per 20 ms per talker; measured in slice 1 by a unit test (`a_voice_packet_costs_microseconds_through_both_adapters`, section 13). |
## 13. Slice 1 as implemented
@@ -924,7 +924,18 @@ What ran against the baseline (main `59fec5b`; the dev servers of
`cargo test -p voelin-core` has two failures that exist on the baseline too
(`discover::tests::without_records_the_gateway_itself_is_asked`,
`web::tests::pictures_go_through_the_proxy_named_for_each_hop`: they need
the network). Not measured: the CPU cost of the second adapter per voice
packet (section 12); the packets are a hundred bytes each way every 20 ms
per talker.
`web::tests::pictures_go_through_the_proxy_named_for_each_hop`: both reach a
server bound to `127.0.0.1` through the name `localhost`, which resolves to
`::1` only on the machine the tests ran on; the modules are unchanged).
The CPU cost of the second adapter per voice packet (section 12) is measured
by the unit test `a_voice_packet_costs_microseconds_through_both_adapters`
(`link/tests.rs`): 5,000 Opus packets of 20 ms each way through both
adapters and the recording link, in a debug build, took about 7 microseconds
per packet to the host and 10 microseconds from it. At one talker that is
well under a tenth of a percent of a core; the test bounds each direction at
500 microseconds. `tests/session_backends.rs` adds two integration tests:
the engine over the protocol repository's `FakeConnector` through
`Engine::start_with_backends` (connect, the server's name, the channels, a
move, disconnect), and the registry's error text for an address no connector
serves.