Show counter values over time in profiler-cli - #6136
Conversation
pq counter info
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6136 +/- ##
==========================================
+ Coverage 83.50% 83.52% +0.02%
==========================================
Files 342 342
Lines 36522 36621 +99
Branches 10125 10259 +134
==========================================
+ Hits 30497 30587 +90
- Misses 5597 5607 +10
+ Partials 428 427 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Ah another thing I noticed while looking at the PRs. Could you please change the PR title and the commit message to include "cli"? Maybe something like |
Add an "over time" section to counter info that splits the current view into time buckets, so a counter's trajectory is visible rather than only an aggregate. Each slice shows the graph-type-appropriate value (level and delta for accumulated counters, the amount for rate counters), its share of the range, and a CO2e estimate where the schema requests one. Values reuse the tooltip formatters and ts-N time names, matching the timeline. A fixed-width sparkline of the trajectory is drawn alongside, in both `counter info` and `counter list`. Closes firefox-devtools#6112
- Scale the sparkline per graph type: relative (min-max) for accumulated counters, absolute for rate counters (process CPU pinned to 0-100%). - Compute process-CPU ratios with the range-scoped max, matching the timeline tooltip. - Exclude the padded boundary samples from the range's counts, sums, and time span. - Rename the internal bucket types and helper (drop "binned"). - Trim the guide's counters section.
|
Thanks for your review, @canova! I've addressed all the issues. |
canova
left a comment
There was a problem hiding this comment.
Great, thanks a lot for this work! I love the new sparklines!
A no-change bucket in "counter info" now prints "0" instead of "+0B" (no sign, no unit); non-zero deltas keep their sign and unit.
Changes: [Sky Ning] Skip preview links for non-main PRs (#6161) [spokodev] fix(gecko-upgrade): don't crash on a counter with empty sample_groups (#6160) [fatadel] Show counter values over time in profiler-cli (#6136) [Markus Stange] Make profile-conversion snapshots more compact and meaningful (#6152) [Markus Stange] More typed arrays: sample + counter times, some frametable columns (#6139) [Nazım Can Altınova] Only render a marker url field as a link when the whole value is a URL (#6163) [fatadel] Show each counter's owning process in profiler-cli (#6164) [Nazım Can Altınova] Document the pre-existing thread info and network JSON schemas in the cli (#6171) [Markus Stange] Copy column contents in getRawSamplesTableBuilderFromExisting for consistency (#6168) [Markus Stange] Convert eligible columns to typed arrays when outputting from profiler-edit (#6167) [Markus Stange] Remove unused samples.thread column (#6151) [Markus Stange] Fixed botched merge which broke 'yarn ts' (#6174) [Nazım Can Altınova] Add marker handles to `profiler-cli thread network` (#6172) [Markus Stange] Update json-slabs 0.3.0 → 0.4.0 (major) (#6176) [Nazım Can Altınova] Surface network activity across profiler-cli (#6175) [Nazım Can Altınova] Add `profile meta` command to profiler-cli (#6177) [Markus Stange] Allow raw marker table's `startTime` and `endTime` columns to be Float64Array (#6169) [nightcityblade] Fix light theme text selection colors (#6186) [Nazım Can Altınova] Import source map URLs from Chrome DevTools traces (#6190) [Nazım Can Altınova] Rename yarn `build-profiler-cli` script to `build-cli` (#6191) [Nazım Can Altınova] Migrate husky to version 9 (#6201) [Nazım Can Altınova] Fix horizontal overflow when the transform navigator is long (#6199) [fatadel] Add a 'hexadecimal' marker schema field format (#6197) [Nazım Can Altınova] Bump source-map to 0.8.0 and remove the old type workaround (#6202) [Nazım Can Altınova] 🔃 Sync: l10n -> main (July 21, 2026) (#6209) And special thanks to our localizers: fr: parmegiani.thomas fr: Théo Chevalier sr: Марко Костић (Marko Kostić) sv-SE: Luna Jernberg tr: Grk zh-CN: Ariel zh-CN: Olvcpr423
Main | Deploy preview
Add an "over time" section to counter info that splits the current view into time buckets, so a counter's trajectory is visible rather than only an aggregate. Each slice shows the graph-type-appropriate value (level and delta for accumulated counters, the amount for rate counters), its share of the range, and a CO2e estimate where the schema requests one. Values reuse the tooltip formatters and ts-N time names, matching the timeline.
A fixed-width sparkline of the trajectory is drawn alongside, in both
counter infoandcounter list.Closes #6112
An example profile to explore - https://share.firefox.dev/4xQbTNj.
Two main changes: