profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Some parts of the UI should be hidden for nostacksampling profiles

Open fqueze opened this issue 4 years ago • 5 comments

When seeing a profile with the nostacksampling feature, some parts of the UI that require samples look a bit broken.

Example profile: https://share.firefox.dev/3lsvZZ6

I think we should:

  • Hide the "Call Tree", "Flame Graph" and "Stack Chart" panels by default. This would match the behavior we have with the "Network" panel that is only visible when the selected process has network markers. This would also result in the "Marker Chart" tab (which is the most useful for profiles with samples) being selected by default.
  • Reduce the timeline track height: we don't need to keep the area where we usually show the activity graph, as we are sure it will always be empty.

┆Issue is synchronized with this Jira Task

fqueze avatar Mar 19 '21 12:03 fqueze

It would be nice if the profile format structurally reflected the fact that there were no samples, rather than sniffing for the feature being turned on. This way imported formats could activate the same interface.

gregtatum avatar Mar 19 '21 19:03 gregtatum

It would be nice if the profile format structurally reflected the fact that there were no samples

samples could be null instead of being zero-length? It would be interesting to see if this isn't too painful to add.

julienw avatar Apr 06 '21 14:04 julienw

From an importers perspective type Thread = { samples?: Samples } would make nice sense. This would mean you need to access the samples through a selector probably, which should most likely be the case already, as the call tree and other components assume they receive a SamplesLikeTable.

gregtatum avatar Apr 06 '21 15:04 gregtatum

Update that may influence this issue: Since Nightly 90 20210527212801, we now have CPU usage for threads, but stacks only have the one "(root)" node. Example profile: https://share.firefox.dev/3hRC2qr

So I think the timeline tracks should be kept, since they are not empty anymore. But the tooltips there wouldn't need to show the "(root)" stack Flame Graph, and Stack Chart are effectively empty and could be hidden. Call Tree also only have the one "(root)", but with some information about number of samples and total time, I don't know if it's useful to keep?

About the "(root)" node in Gecko Profiles: It was the simplest way to implement it in the backend, and have a good-enough display in the frontend without any extra work. But we could implement a better solution where the backend wouldn't even output the "stack" field (so we don't have millions of useless nulls). If needed, please contact me to discuss further.

squelart avatar Jun 09 '21 10:06 squelart

* Hide the "Call Tree", "Flame Graph" and "Stack Chart" panels by default. This would match the behavior we have with the "Network" panel that is only visible when the selected process has network markers. This would also result in the "Marker Chart" tab (which is the most useful for profiles with samples) being selected by default.

I fixed this in #4133.

* Reduce the timeline track height: we don't need to keep the area where we usually show the activity graph, as we are sure it will always be empty.

I haven't done this.

fqueze avatar Jul 19 '22 16:07 fqueze