Inspect runtime activity and copies¶
Use runtime observations to explain where a pipeline is spending time and how data crosses instrumented boundaries. Name the scope of a counter before using it to compare implementations.
Read a performance snapshot¶
With the MS2 native profile:
The complete example sets REMOTEMEDIA_PERF_TAP=1 before creating the session, subscribes to __perf__.out, sends four text inputs, and waits up to five seconds for a snapshot. The publisher emits on a one-second interval in the reviewed runtime.
Snapshots include session identity, timestamp, window length and per-node data such as input/output counts and latency summaries. The example is a tiny CPU text workload, useful for validating the API. Four messages do not establish a stable latency percentile or real-device performance.
Separate copy boundaries¶
| API or field | Scope |
|---|---|
session.input_copy_report() |
Input materialization/transport authorities, grouped by policy and reason |
session.node_copy_reports() |
Instrumented node boundaries and their copy authorities |
copied_bytes, completed |
Recorded completed copies at that boundary |
rejected_bytes, rejected |
Requests denied by policy; not completed copies |
failed, in_flight, saturated |
Incomplete, outstanding, or bounded-accounting conditions that affect interpretation |
Do not sum unrelated scopes as if they were a single physical memory counter. A zero value can describe an unexercised path; it does not prove no allocator, codec, Python library, driver or device made a copy. The data example deliberately rejects list materialization under a strict input policy and records the result.
Worker shutdown can leave a copy-accounting closure error in the tested Windows native profile while every process exits. Keep that diagnostic in the evidence. Do not use those shutdown records to claim complete accounting conservation.
Events and placement¶
recv_event() exposes attributed participant output; the shared-session example verifies it. __system__.out is the reviewed lifecycle event tap and __timeline__.out carries diagnostic markers. Those tap contracts are source-reviewed here; this example executes the performance tap. A live subscription is not a persisted event history.
Scaling placement belongs to Entry and the runners' advertised capabilities. The local harness provides one runner with static discovery and records its binary hashes. It does not test placement across multiple machines, failover, or dynamic capacity. Correlate session, node and participant identifiers with the server logs before attributing a delay to placement.
Measure the user-facing result separately¶
For a real audio/video application, retain the physical device, model/artifact identity, representative input, startup time, sustained run duration, latency boundary and output artifact. Use listening or visual evaluation when quality is the acceptance criterion. An API test, a performance snapshot, and a device benchmark answer different questions.
Source references: remotemedia-sdk/crates/transports/ffi/src/streaming_session.rs · remotemedia-sdk-base/src/transport/session_control.rs (base revision; reviewed with local changes) · remotemedia-sdk/crates/transports/ffi/src/python/buffer_config.rs (base revision; reviewed with local changes) · remotemedia-sdk-base/src/transport/shared_session.rs (base revision; reviewed with local changes) · remotemedia-scaling/crates/entry/src/control.rs