Always render the CPU-usage-aware activity graph when CPU information is available#5918
Conversation
… is available. The UI for switching the activity graph type isn't visible by default and nobody has complained about its absence. This simplifies the code. The timelineType values 'category' and 'cpu-category' are now equivalent.
e219930 to
47f14ab
Compare
47f14ab to
7aad328
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5918 +/- ##
=======================================
Coverage 85.44% 85.45%
=======================================
Files 321 321
Lines 32164 32139 -25
Branches 8781 8850 +69
=======================================
- Hits 27483 27463 -20
+ Misses 4245 4241 -4
+ Partials 436 435 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
canova
left a comment
There was a problem hiding this comment.
Nice, one less thing to maintain!
I guess the stack height graph could still be useful for old profiles that don't contain any category information. But it's been a while since we added that, and using a default category would still be an okay solution for these older ones. But let's think about it some other time.
| timelineType === 'cpu-category' | ||
| ? (hoveredPixelState as HoveredPixelState).cpuRatioInTimeRange | ||
| : null | ||
| } |
There was a problem hiding this comment.
Oh that was weird before. At first I thought we were removing the field which could result in a bug, but apparently it was always initialized to null and never changed...
| %cwindow.experimental%c - The object that holds flags of all the experimental features. | ||
| %cwindow.togglePseudoLocalization%c - Enable pseudo localizations by passing "accented" or "bidi" to this function, or disable using no parameters. | ||
| %cwindow.toggleTimelineType%c - Toggle timeline graph type by passing "cpu-category", "category", or "stack". | ||
| %cwindow.toggleTimelineType%c - Toggle timeline graph type by passing "cpu-category" or "stack". |
There was a problem hiding this comment.
I even forgot that toggleTimelineType existed! It's been that long since I've used it last time :)
Changes: [Nazım Can Altınova] Add Adel to the automatic dependency reviews (#5930) [fatadel] Fix arrow panel appearing behind marker tooltips (#5926) [fatadel] Upgrade Node.js from v22 to v24 (#5923) [Markus Stange] Use createStackTableBySkippingDiscarded in focusSelf. (#5916) [Markus Stange] Propagate isJS to symbolicated funcs (#5907) [Markus Stange] Always render the CPU-usage-aware activity graph when CPU information is available (#5918) [Nazım Can Altınova] Fallback to javascript highlighting in the source view as a backup (#5936) [Nazım Can Altınova] Properly type the return value of _languageExtForPath (#5937) [Nazım Can Altınova] Update typescript eslint dependencies (#5938) [Markus Stange] Modernize more of the transform functions (#5934) [Paul Adenot] Fix extractGeckoLogs for structured Log marker format (bug 2022540) (#5927) [Nazım Can Altınova] Move some profile fetching code into a separate module. (#5939) [Markus Stange] Update the hovered item when panning any viewport canvas (#5903) [Markus Stange] Migrate Home page animation to CSS transitions and remove react-transition-group (#5649) [Nazım Can Altınova] Fix test/lint commands on Windows and fix CI (#5947) [Nazım Can Altınova] Convert profile-logic/js-tracer.tsx to a ts file (#5942) [Markus Stange] Remove panelLayoutGeneration (#5946) [fatadel] Add CounterDisplayConfig to counters in the processed profile format (#5912) [Nazım Can Altınova] Fix eslint-config-prettier silently overriding custom rules (#5955) [fatadel] Dim non-matching nodes in the stack chart when searching (#5935) [Nazım Can Altınova] Fix loading .json.gz profiles from inside zip archives (#5959) [Ryan Hunt] Add a fullscreen button to the bottom box (#5605) [Markus Stange] Speed up _computeCallNodeTableHierarchy by keeping siblings ordered by func (#5964) [Markus Stange] Replace symbolicator-cli with a profiler-edit node tool (#5965) [Nazım Can Altınova] Add "Include idle samples" toggle to the call tree settings (#5968) [Nazım Can Altınova] Add dark mode versions of the fullscreen icons (#5972) [fatadel] Replace 4 counter track components with a single generic TrackCounter (#5944) [fatadel] Use ephemeral port for esbuild's internal dev server (#5974) [carverdamien] Remove category from LongTaskMarkerPayload (#5975) And special thanks to our localizers: de: Ger de: Michael Köhler el: Jim Spentzos en-GB: Ian Neal es-CL: ravmn fr: Théo Chevalier ia: Melo46 it: Francesco Lodolo [:flod] nl: Mark Heijl pt-BR: Marcelo Ghelman ru: Valery Ledovskoy ru: berry sv-SE: Andreas Pettersson tr: Grk zh-CN: Olvcpr423 zh-CN: wxie zh-TW: Pin-guang Chen
This simplifies the activity graph drawing code because we no longer have to check whether to respect CPU usage information.
This PR removes the 'category' timeline type and always uses 'cpu-category' to mean "CPU-aware category graph if CPU usage information is available, plain category graph otherwise". I'm still keeping the 'stack' timeline type but we can probably remove that one too.
When @canova first added the CPU-aware activity graph, I was a bit on the fence because I was afraid it would make responsiveness issues with lock contention less visible. So I think I may have been the primary audience for the ability to switch to the CPU-unaware activity graph. But I'm really happy with the CPU-usage aware activity graph these days and I've never made use of the ability to switch from the console.