firefox-devtools / firefox-devtools/profiler

Clarify that CPU is between samples and category&stack are at sample time

Open
#3,240 5 comments 1 reaction 0 assignees View on GitHub
help wanted polish timeline
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

When CPU numbers are shown, the tooltip looks like this:
![profiler-cpu-tooltip](https://user-images.githubusercontent.com/8499548/112552469-fd001d80-8e16-11eb-96a1-e87169c749a1.png)
So it's something like this:
> Category: **[] Layout...**
> CPU Usage: **97% (...)**
> Stack:
> **parse_into()...**
> **...**

I'm concerned that we're mixing two "domains" of information, and it may give the wrong impression, e.g.: "Wow, this parse_into in layout is taking 97% of a CPU!".
But in fact, all we can say from this data is: Since the previous sample and now, we have used 97% of a CPU; And at this exact sample time we were calling parse_into in layout.

So I think we should clarify the difference.
Suggestion:
> CPU Usage since previous sample: **97% (...)**
> .....................................................................................
> Sample at time: **0.8465s**
> Category: **[] Layout...**
> Stack:
> **parse_into()...**
> **...**

This clearly separates the more continuous CPU numbers from the point-like sample data.

As a bonus it shows the precise timestamp. I don't know how valuable that is, but for example it could help find markers at that time in the Marker Table.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-372)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.