Skip to content

feat(samples): add a Compose app that writes to tracy, measure it - #93

Merged
youndie merged 2 commits into
mainfrom
feat/compose-app-sample
Oct 6, 2026
Merged

youndie merged 2 commits into
mainfrom
feat/compose-app-sample

Conversation

@youndie

@youndie youndie commented Oct 6, 2026

Copy link
Copy Markdown
Owner

M-148 (research-clients, open question 1).

Two commits on purpose. The first, docs(samples): pre-register…, states the threshold before anything was built: the agent may add at most 10 % to the gzipped .wasm of the same app without it. It was pushed alone first (as 7c81698, rebased onto #92 as d21a5be with its author date kept), so the number could not move the threshold.

The sample (samples/compose-app, a build of its own taking the agent from this checkout via includeBuild): desktop and browser. Two buttons — one opens a trace with action("order.open"), one records a screen that drew a placeholder, with originalType as an indexed field. Client key, maxBatchBytes under the client ceiling, flushWhenBackgrounded(). -Ptracy.agent=false builds the same app with the telemetry compiled to nothing.

Result (MEASUREMENT.md): all .wasm gzipped, 3 900 869 B without the agent, 4 096 779 B with it — +195 910 B, +5.0 %, under the threshold. Also written down: against the app's own .wasm without skiko it is +34 %; skiko is 85 % of the first download here.

Checked by hand in a browser against a local server.kexe with TRACY_CLIENT_KEYS: the page sent OPTIONS /ingest → 204 (#89) and two POST /ingest → 202; the database held service app:compose-app (the header said compose-app, the key decided — #86), a root span order.open (#87), the warning with untrusted = 1, and the entity reference originalType = promo-carousel-v3. Desktop, Android and iOS were not run against a server.

Found on the way: the first page was blank — ComposeViewport(document.body) fills an unstyled body that is 0 px tall. index.html now sizes it. The shildik sample (youndie/shildik#73) carries the same file and gets the same fix separately.

.github/workflows/sample.yml builds both variants when the sample, the agent or the wire change.

The threshold is committed before the first build is measured, so it cannot
move to meet the number: at most 10 percent on the gzipped .wasm of the same
Compose app built without the agent.

Refs: M-148
The client line had a test from app to service but no app. This one writes with
a client key, opens a trace around a button press, records a degraded screen
with an indexed field and flushes on leaving; built with and without the agent
it answers the pre-registered size question: +5.0 percent of the gzipped wasm.

Refs: M-148
@youndie
youndie merged commit ab0995b into main Oct 6, 2026
2 checks passed
@youndie
youndie deleted the feat/compose-app-sample branch October 6, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant