parca
parca copied to clipboard
pkg/query: relative comparisons
When comparing profiles, people usually want to compare relatively, meaning they care about the relative percentages that changed between the profiles, not about the exact times a stack has been seen. This change ensures that we scale both profiles to the same total cumulative value for the root and then multiply each diff value by the ratio between both roots.
🤖 Meticulous spotted visual differences in 37 of 498 screens tested: view and approve differences detected.
Last updated for commit 3f4cb5c. This comment will update as new commits are pushed.
Now, we need to figure out the UX and UI to enable or disable the relative comparison. Most likely, a toggle that will show when comparing makes the most sense.
Absolute
This shows the absolute comparison between the two profiles.
It is what we have had all along. It'll be the default for all non-delta profiles (goroutine, memory).
Relative
This shows the relative comparison of the two profiles. The smaller (in terms of overall cumulative value) profile gets scaled up (all of its values are multiplied by the factor the bigger profile is bigger) to have both profiles' total cumulative values be the same. Therefore, compare the percentage between all functions of both profiles.