Skip to content

Conversation

@fqueze
Copy link
Contributor

@fqueze fqueze commented Feb 7, 2025

gradle-profiler can generate these profiles when using the async-profiler format or the jfr format.
Example imported profiles for the async-profiler format and for the jfr format.

@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

❌ Patch coverage is 97.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.66%. Comparing base (f48e0e0) to head (3358235).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/import/flame-graph.ts 97.72% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5359      +/-   ##
==========================================
- Coverage   85.66%   85.66%   -0.01%     
==========================================
  Files         313      313              
  Lines       30982    30985       +3     
  Branches     8515     8519       +4     
==========================================
+ Hits        26541    26543       +2     
- Misses       4011     4012       +1     
  Partials      430      430              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@canova canova force-pushed the import-flamegraph branch from 67aff3c to f48e0e0 Compare December 5, 2025 13:08
@canova
Copy link
Member

canova commented Dec 5, 2025

I updated the code, rebased it after the TS migration and added some tests. Let me know what you think!
Here's an example file that's also included in the branch:
flamegraph.txt

@canova canova requested a review from mstange December 5, 2025 13:12
Comment on lines +169 to +171
while (count-- > 0) {
addSample(timeStamp++, stack);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

huh, why not make use of the frame weight?

Copy link
Member

Choose a reason for hiding this comment

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

I tried that too, but our activity graph's weight support is really not great, that's why I didn't really like it that much.

Without individual samples, every different stack looks like just 1 sample, even if its weight was 1000. So it really looks disproportionate and you really don't see the stacks with lots of weight that easily by just clicking around on the timeline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense! There's a proposal in #4101 (comment) for what we could do here.

Copy link
Member

Choose a reason for hiding this comment

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

Ah thanks! Yes, that would be great to improve.

@canova canova merged commit 2ce8ab6 into firefox-devtools:main Dec 11, 2025
21 checks passed
@canova canova mentioned this pull request Dec 18, 2025
canova added a commit that referenced this pull request Dec 18, 2025
Changes:

[Markus Stange] Use a longer test timeout when debugging with VS code.
(#5679)
[Markus Stange] Move Jest config from package.json to jest.config.js
(#5680)
[Markus Stange] Make binary profile format parsing use Uint8Array
instead of ArrayBuffer (#5678)
[Markus Stange] Use workbox-cli to generate the service worker (#5681)
[Nazım Can Altınova] Migrate from Appveyor to GitHub Actions Windows
runners (#5660)
[Nazım Can Altınova] Remove some unused dependencies (#5696)
[Nazım Can Altınova] Update the document links and sections (#5705)
[Nazım Can Altınova] Clear selected and expanded call node paths on
browser back button if it removes transforms (#5701)
[Nazım Can Altınova] Properly type the Map and Set objects (#5623)
[Valentin Gosu] Add priorityHeader field to network requests (#5707)
[Nazım Can Altınova] Redirect unpublished url loads to the homepage
similar to from-file (#5712)
[Florian Quèze/Nazım Can Altınova] Add an importer for the text format
taken as input by flamegraph.pl. (#5359)
[Florian Quèze] Improve the import of profiles generated from clang
-ftime-trace=file.json (#5714)
[Markus Stange] Move React stuff out of marker schema logic module.
(#5720)

And thanks to our localizers:

en-CA: chutten
en-CA: Paul
es-CL: ravmn
fr: Théo Chevalier
fur: Fabio Tomat
ru: berry
tr: Selim Şumlu
zh-CN: Olvcpr423
zh-CN: wxie
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