Skip to content

Show size units in the timeline for size profiles#5364

Merged
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:show-size-units
Feb 25, 2025
Merged

Show size units in the timeline for size profiles#5364
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:show-size-units

Conversation

@fqueze

@fqueze fqueze commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Feb 10, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.05882% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.90%. Comparing base (7f30744) to head (2caf554).
Report is 91 commits behind head on main.

Files with missing lines Patch % Lines
src/components/timeline/Ruler.js 83.33% 2 Missing ⚠️
src/profile-logic/committed-ranges.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5364      +/-   ##
==========================================
+ Coverage   85.84%   85.90%   +0.06%     
==========================================
  Files         312      312              
  Lines       29827    29893      +66     
  Branches     8213     8245      +32     
==========================================
+ Hits        25605    25680      +75     
+ Misses       3627     3621       -6     
+ Partials      595      592       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mstange

mstange commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

I think this is cool idea. But I think it shouldn't be magically based on threads[0].samples.weightType - it's something that affects all threads and it should be explicitly set in the profile, for example inside profile.meta.

@mstange mstange self-requested a review February 19, 2025 16:18

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good, all my change requests are about types, function names and tests.

Comment thread src/components/timeline/Ruler.js Outdated
Comment thread src/components/timeline/Ruler.js Outdated
Comment thread src/components/timeline/Ruler.js Outdated
Comment thread src/profile-logic/committed-ranges.js Outdated
Comment thread src/profile-logic/committed-ranges.js Outdated
Comment on lines +259 to +260
['bytes', 123456789],
['bytes', 123456789123],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(no action needed:) It's interesting to me that format-numbers.js is tested via the marker schema. It would make more sense to me to have these tests in format-numbers.test.js but I guess you're just following what's already there.

Comment thread src/utils/format-numbers.js
Comment thread src/selectors/profile.js Outdated
@fqueze fqueze requested a review from mstange February 25, 2025 14:08

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I should acknowledge that it's going to be confusing to have many variables with time or Milliseconds in them which can now store values in bytes. Can you file a follow-up issue to find a way to clean this up (for example by renaming time to offset)?

Comment thread src/components/timeline/Ruler.js Outdated
Comment thread src/components/timeline/Ruler.js Outdated
@fqueze fqueze merged commit 160f89f into firefox-devtools:main Feb 25, 2025
@fqueze fqueze deleted the show-size-units branch February 25, 2025 15:46
mstange added a commit to mstange/perf.html that referenced this pull request Feb 25, 2025
mstange added a commit to mstange/perf.html that referenced this pull request Feb 25, 2025
julienw pushed a commit that referenced this pull request Feb 26, 2025
@julienw julienw mentioned this pull request Mar 3, 2025
julienw added a commit that referenced this pull request Mar 3, 2025
[Julien Wajsberg] Update node to v22 (#5378)
[Markus Stange] Speed up createCallNodeTable by 2.3x (#5248)
[Markus Stange] Remove frameTable.implementation from the processed format. (#5370)
[Florian Quèze] Show size units in the timeline for profiles where profile.meta.sampleUnits.time is "bytes". (#5364)
[Sean Kim] Report nsIRequest::status (nsresult) in the marker (#5375)
[Markus Stange] Change the marker schema to accept a description and get rid of the notion of static fields (#5385)

Also thanks to our localizers:
en-CA: Paul
tr: Grk
@julienw

julienw commented Apr 14, 2025

Copy link
Copy Markdown
Contributor

looks like this was forgotten:

durationText={formatMilliseconds(duration)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants