Skip to content

Draw a single rectangle for 2 markers in bar charts only if both the …#4734

Merged
julienw merged 2 commits into
firefox-devtools:mainfrom
fqueze:fix-bar-charts
Sep 13, 2023
Merged

Draw a single rectangle for 2 markers in bar charts only if both the …#4734
julienw merged 2 commits into
firefox-devtools:mainfrom
fqueze:fix-bar-charts

Conversation

@fqueze

@fqueze fqueze commented Aug 29, 2023

Copy link
Copy Markdown
Contributor

…start and end horizontal pixels match.

This fixes a regression from #4711.

https://share.firefox.dev/3sB46FE is an example of a profile where the marker track shape is very different with/without the fix.

I also verified using console.log debugging that the big profiles in #4711 still merge some markers for drawing (ie. that the optimization still works).

@fqueze fqueze requested a review from canova August 29, 2023 02:42
@codecov

codecov Bot commented Aug 29, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 80.00% and project coverage change: +0.01% 🎉

Comparison is base (e6cad20) 88.32% compared to head (b875351) 88.34%.

❗ Current head b875351 differs from pull request most recent head 1ee1732. Consider uploading reports for the commit 1ee1732 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4734      +/-   ##
==========================================
+ Coverage   88.32%   88.34%   +0.01%     
==========================================
  Files         300      299       -1     
  Lines       26733    26727       -6     
  Branches     7213     7214       +1     
==========================================
- Hits        23612    23611       -1     
+ Misses       2908     2903       -5     
  Partials      213      213              
Files Changed Coverage Δ
src/components/timeline/TrackCustomMarkerGraph.js 74.08% <80.00%> (-0.28%) ⬇️

... and 7 files with indirect coverage changes

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

@julienw

julienw commented Sep 1, 2023

Copy link
Copy Markdown
Contributor

I'm a bit confused: I see spikes with the deploy preview, the spikes are always thin no matter how much I zoom in around them, and I can't hover them. Is that expected?

Screencast_20230901_155141.webm

Another source of confusion that is unrelated to this patch: where does the label "CPU Use" come from? I don't see it in the schema, I only see "CPU".

@fqueze

fqueze commented Sep 1, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for looking at this PR :).

I see spikes with the deploy preview, the spikes are always thin no matter how much I zoom in around them, and I can't hover them. Is that expected?

It's not expected, in that it's a bug of the python code generating the profile (I've now added a workaround to remove these spikes from the generated profiles), but the profiler front-end is behaving reasonably when showing these tiny spikes (if you keep zooming, you may be able to hover them at some point, they last about 1ms when the other markers are 1 or 2s long). Without the PR, the larger markers are shown drawn at the height of these spikes, and that's what actually made me realize there was a regression in how these charts are drawn.

Another source of confusion that is unrelated to this patch: where does the label "CPU Use" come from? I don't see it in the schema, I only see "CPU".

It's the marker name.

@julienw julienw 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, thanks

@julienw julienw enabled auto-merge (squash) September 13, 2023 14:02
@julienw julienw merged commit f615beb into firefox-devtools:main Sep 13, 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