firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.14k stars 372 forks source link

Only count markers that are part of the selected range when hovering a marker in the marker chart. #5004

Closed fqueze closed 1 month ago

fqueze commented 1 month ago

Fixes a bug in the implementation of #4892.

Steps to reproduce:

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.46%. Comparing base (ffe2b6a) to head (1a18805).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5004 +/- ## ======================================= Coverage 88.46% 88.46% ======================================= Files 304 304 Lines 27317 27329 +12 Branches 7377 7378 +1 ======================================= + Hits 24165 24177 +12 Misses 2930 2930 Partials 222 222 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fqueze commented 1 month ago

Thanks for the review!

I'm not super happy about this duplication, but let's do that...

I'm not super happy about the duplication either. I initially wanted to make a shared method returning timeAtViewportLeft and timeAtViewportRightPlusMargin, but then I realized some of the intermediary variables are used for the other caller, so I wouldn't actually win much.