Skip to content

Avoid showing the calltree panel in profiles without samples#4744

Merged
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:avoid-calltree-when-no-samples
Sep 14, 2023
Merged

Avoid showing the calltree panel in profiles without samples#4744
fqueze merged 1 commit into
firefox-devtools:mainfrom
fqueze:avoid-calltree-when-no-samples

Conversation

@fqueze

@fqueze fqueze commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

This makes the "marker-chart" the default panel for profiles without samples. It also prevents from switching to the calltree panel when clicking the activity graph of a profile without samples (eg. where all samples are only "(root)").

Example of profile without samples to test with: https://profiler.firefox.com/public/w6a188gqfkm227vmvqgc69tj5edj49kqwyntefr/
Deploy preview: https://deploy-preview-4744--perf-html.netlify.app/public/w6a188gqfkm227vmvqgc69tj5edj49kqwyntefr/

@fqueze fqueze requested a review from canova September 12, 2023 14:21
@codecov

codecov Bot commented Sep 12, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9001486) 88.32% compared to head (6e003ca) 88.33%.
Report is 3 commits behind head on main.

❗ Current head 6e003ca differs from pull request most recent head 6c21898. Consider uploading reports for the commit 6c21898 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4744   +/-   ##
=======================================
  Coverage   88.32%   88.33%           
=======================================
  Files         300      300           
  Lines       26733    26746   +13     
  Branches     7213     7217    +4     
=======================================
+ Hits        23612    23625   +13     
  Misses       2908     2908           
  Partials      213      213           
Files Changed Coverage Δ
src/actions/receive-profile.js 86.45% <100.00%> (+0.29%) ⬆️
src/components/timeline/TrackThread.js 98.63% <100.00%> (ø)
src/reducers/url-state.js 98.25% <100.00%> (+<0.01%) ⬆️

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

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great to me, thanks for the fix!

timelineType = determineTimelineType(profile);
}

let selectedTab = getSelectedTab(getState());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Can we add a short code comment here maybe telling them that we are doing this for profiles without samples data.

@fqueze fqueze force-pushed the avoid-calltree-when-no-samples branch from 6e003ca to 6c21898 Compare September 14, 2023 21:26
@fqueze fqueze enabled auto-merge (squash) September 14, 2023 21:30
@fqueze fqueze force-pushed the avoid-calltree-when-no-samples branch from 6c21898 to 30cb840 Compare September 14, 2023 21:31
@fqueze fqueze merged commit 2a8c44b into firefox-devtools:main Sep 14, 2023
tenderlove added a commit to tenderlove/profiler that referenced this pull request Jan 16, 2024
* main: (37 commits)
  Show the hovered time in the ruler at the top of the timeline. (PR firefox-devtools#4748)
  Hardcode 'project' to 'firefox-profiler' in .taskcluster.yml (PR firefox-devtools#4759)
  Update all Yarn dependencies (2023-09-27) (PR firefox-devtools#4758)
  Update the uploading command in the developer documentation (PR firefox-devtools#4752)
  Make prettier ignore the taskcluster files
  Add taskcluster
  Update all Yarn dependencies (2023-09-20) (PR firefox-devtools#4756)
  Add a robots.txt file to disallow indexing our profile links (PR firefox-devtools#4753)
  Avoid showing the calltree panel in profiles without samples. (PR firefox-devtools#4744)
  Display the vertical line in the timeline when hovering the marker chart or stack chart (PR firefox-devtools#4742)
  Draw a single rectangle for 2 markers in bar charts only if both the start and end horizontal pixels match. (PR firefox-devtools#4734)
  Update all Yarn dependencies (2023-09-13) (firefox-devtools#4746)
  Update all Yarn dependencies (2023-09-06) (PR firefox-devtools#4741)
  Remove prefer-wait-for rule in our config because it's been removed from the plugin
  ⬆️ Update eslint-plugin-testing-library to version 6.0.1
  Use a cache for prettier (PR firefox-devtools#4731)
  Remove leftover eslint error
  Run prettier on the codebase
  Upgrade prettier to latest version
  Ignore the coverage directory when present
  ...
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.

2 participants