feat: Add peak RAM usage line & remove summary#2
Merged
Conversation
Alongside each span's human streaming line, emit `[texray] <name> peak-rss-bytes=<N>` (raw bytes) when RAM tracking and streaming are both on. Lets programmatic consumers read peak RSS as a single integer instead of parsing the human-formatted `peak <X> MiB/GiB` suffix or the summary graph. None is emitted when no RSS was sampled (non-Linux / RAM tracking off).
Remove the `RAM:` block rendered below the timeline when the examined root span exits (`render_ram`) and its tests. RSS is still sampled when track_ram is on and surfaced per span by the streaming close lines (human `peak` plus the machine-readable `peak-rss-bytes=<N>` companion), so memory is visible during the run without a trailing summary block. Docs updated to match.
Gate RSS sampling on `track_ram && streaming` (via a `sample_rss()` helper) rather than `track_ram` alone, at all three sample sites (span enter, exit, examined-root populate). The streaming close lines are the only consumer of the samples, so with streaming off `track_ram` would pay for per-span `/proc/self/status` reads that nothing renders. Documented on `track_ram()`.
samuelburnham
force-pushed
the
peak-rss-bytes
branch
from
June 19, 2026 13:43
afb4c59 to
db8c8ac
Compare
arthurpaulino
approved these changes
Jun 19, 2026
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.
Adds a peak RAM usage line for debugging and CI benchmarks. Also, the streaming RAM output is concise and has the delta and peak RSS per span, so we don't need the final RAM summary which was overly verbose. The
track_ramoption now needsstreamingotherwise it's a no-op