Profiler cli screenshots pr - #6278
Open
fqueze wants to merge 2 commits into
Open
Conversation
…ry layer Screenshot markers have no marker schema (firefox-devtools#5303), so collectMarkerInfo produced no fields for them at all, and the image -- a data URL stored as a string table index in payload.url -- was unreachable from the query layer. Adds src/profile-query/screenshot.ts, which resolves that index through the string table and looks screenshots up by instant or range. An instant resolves each window separately, since several are captured concurrently and one window's frame says nothing about another's: a window whose frames all precede the instant reports its latest one as isFallback/staleByMs rather than as the frame at that time, and one already destroyed is dropped. Payloads also appear as rawFields on MarkerInfoResult, elided to a stand-in for --json.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6278 +/- ##
==========================================
+ Coverage 83.79% 83.80% +0.01%
==========================================
Files 350 351 +1
Lines 37583 37798 +215
Branches 10459 10630 +171
==========================================
+ Hits 31492 31676 +184
- Misses 5664 5695 +31
Partials 427 427 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
'screenshots --at T -o dir/' answers "show me the screen at t=T", writing one image per window on screen at that instant, since several windows are captured concurrently; '--range A,B -o dir/' writes every frame in a range. Frames that only precede the instant are labelled stale, so a window that painted nothing recently is never passed off as current. 'marker screenshot m-N -o shot.jpg' extracts one window's image from a single marker. Both require -o rather than defaulting to a name in the current directory, so neither drops a binary somewhere the caller did not ask for. --json honours -o too, reporting each written path, and elides the base64 image the way 'thread markers --list --json' does rather than inlining megabytes into a payload meant to be piped into jq.
fqueze
force-pushed
the
profiler-cli-screenshots-pr
branch
from
August 20, 2026 19:38
4d9fa71 to
76fa311
Compare
Member
|
I haven't checked the code yet, but have you looked at #6261? (also I think Markus had a WIP branch somewhere) I think it would be good to land that one first so we can build on top of it |
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.
Main | Deploy preview
Makes
CompositorScreenshotimages reachable from the CLI. They're in the profile,but nothing could get at them, so sessions resorted to ~30 lines of Python over the
gzipped JSON.
Two commits:
stored as a string table index, was unreachable. Adds lookup by instant or range.
marker screenshotandscreenshots— write one image, or one per window ata time / over a range. Both require
-o;--jsonhonours it and elides thebase64 like
thread markers --list --json.A profile normally has several windows (harness + browser at minimum), so an instant
resolves each window separately and
--atreturns one image per window, with awin Ncolumn to tell them apart:A window whose frames all precede the instant is labelled stale rather than passed
off as current.
src/profile-query/is shared with profiler.firefox.com; the additions there are newexports, no existing path changes behaviour.