core: Add Scout-compatible FLM telemetry system#24108
Draft
gpeacock wants to merge 2 commits into
Draft
Conversation
Add an opt-in telemetry backend that records frame, render, input, network, and memory metrics in Adobe Scout's FLM format, with support for live streaming over TCP in addition to writing to a file. - New `core/src/telemetry.rs` module with span/counter recording and AMF3-based FLM serialization - Desktop CLI gains a `--telemetry` flag to opt in and configure output - Player and context wiring to record frame/render/input/network spans and counters, plus bitmap decompression timing (`rend.buildbits`) - Adds a Python-based FLM reader/decoder and end-to-end tests under tests/tests/telemetry, plus usage documentation
b8d9b72 to
6677d1f
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.
Description
Adds an opt-in telemetry backend to Ruffle core that records frame, render, input, network, and memory metrics and serializes them in Adobe Scout's FLM (AMF3-based) format. Desktop builds can also stream telemetry live over TCP to a running Scout instance while still buffering the full session for
write_flmon exit.core/src/telemetry.rs: span/counter recording and FLM serializationdesktop:--telemetryCLI flag to opt in and configure output/streamingcore: player/context wiring to record frame, render (including bitmap decompression asrend.buildbits), input, network, and memory spanstests/tests/telemetry/to aid verification and debuggingSee
tests/tests/telemetry/TELEMETRY_USAGE.mdfor full usage details.Testing
Added
tests/tests/telemetry/test_complete.rsandtest_spans_gen.rs, which exercise recording a full session and validate the emitted.flmoutput.amf3reader.py/telemetry.pyprovide an independent Python-based decoder used to cross-check the binary format against Scout's expectations.Locally verified:
cargo check -p ruffle_core,cargo fmt --check -p ruffle_core, andcargo clippy -p ruffle_core -- -D warningsall pass clean.Checklist