Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color diffusion mode gives less useful results in flamechart mode #272

Open
itamarst opened this issue Oct 30, 2022 · 2 comments
Open

Color diffusion mode gives less useful results in flamechart mode #272

itamarst opened this issue Oct 30, 2022 · 2 comments

Comments

@itamarst
Copy link
Contributor

itamarst commented Oct 30, 2022

Consider the following profiling result:

bottleneck 20
interlude 20
bottleneck 20
interlude 20
bottleneck 20

In flamegraph mode with --colordiffusion, the bottleneck is darker red, since it is 60% of time spent vs 40%:

Screenshot from 2022-10-30 08-57-01

In flamechart mode, however, the segments all have the same red saturation:

Screenshot from 2022-10-30 08-57-30

Insofar as the goal of the color mode is to highlight more significant parts of the code, this is wrong: the relative saturation should be the same as in the flamegraph. Just because the bottleneck is chopped up doesn't mean it has ceased to be the bottleneck, it should still be redder.

@jonhoo
Copy link
Owner

jonhoo commented Oct 30, 2022

I agree, although I also suspect this'll be quite tricky to fix in chart mode. You'd need a sort of two-pass thing where we first scan for how expensive each function is in aggregate (by basically doing a non-chart plot and now drawing it), and then carrying that information forward into chart mode.

@itamarst
Copy link
Contributor Author

Yeah, or a trie-like thing.

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

No branches or pull requests

2 participants