google / pprof

pprof is a tool for visualization and analysis of profiling data
Apache License 2.0
8.02k stars 607 forks source link

Flamegraph uses seconds instead of hours when appropriate. #851

Closed ghemawat closed 7 months ago

ghemawat commented 7 months ago

The Javascript code now behave the same as the Go code. (It switches to the next unit only if one unit is at least as big as the value being displayed.) The main effect is that we no longer use "hours" as the unit for time values in the range [36s,3600s). We only switch to using "hours" when the measured time is at least one hour. This is easier for users to understand: e.g., a time value of hundred seconds now displays as "100s", not "0.03hrs".

Also added a unittest for the Javascript unit picking code.

codecov-commenter commented 7 months ago

Codecov Report

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

Project coverage is 66.91%. Comparing base (0ed6a68) to head (6783fca). Report is 14 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #851 +/- ## ========================================== + Coverage 66.86% 66.91% +0.05% ========================================== Files 44 44 Lines 9824 9791 -33 ========================================== - Hits 6569 6552 -17 + Misses 2794 2784 -10 + Partials 461 455 -6 ```

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