You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's a specific part of the program you want to optimise, let's say a single function, you'll run the flame graph tool and that function will take a certain amount of time of the whole graph. If you then make an improvement, you'll be able to measure how much time has changed in that main function compared to the whole graph fairly easily.
However, it's likely that a certain operation didn't get done the same amount of times (eg. in the case of a server, you won't get the same amount of requests), but you'll still get the same ratio within that function.
What then becomes cumbersome is trying to find out how much impact a certain change has. Let's say you have the main function taking 43% in the first profile, and 49% in the next, but what you're trying to profile inside of that is 15% in the first and 14% in the second. You can tell it made an improvement.
What becomes hard is to know how large that improvement is relative to the "main" function, not the whole profile. It would be interesting that if you select a certain part of the trace, all child traces would (in brackets maybe?) have the ratio within the function which is currently focused too.
If there's already a way to get that info, I'm also very happy of course 👍
For now my workaround is calculating myself by dividing the number of samples of my optimised subfunction to the main function in both traces, which can give a percentage (583/1611, 36.19% in one and 538/1852, 29.05% in the other one).
The text was updated successfully, but these errors were encountered:
flamegraph is basically a wrapper around the inferno library, which helps collect perf or dtrace data, then passes it to perf. I think this feature request is something that ought to be implemented in inferno (if it does not already exist).
If there's a specific part of the program you want to optimise, let's say a single function, you'll run the flame graph tool and that function will take a certain amount of time of the whole graph. If you then make an improvement, you'll be able to measure how much time has changed in that main function compared to the whole graph fairly easily.
However, it's likely that a certain operation didn't get done the same amount of times (eg. in the case of a server, you won't get the same amount of requests), but you'll still get the same ratio within that function.
What then becomes cumbersome is trying to find out how much impact a certain change has. Let's say you have the main function taking 43% in the first profile, and 49% in the next, but what you're trying to profile inside of that is 15% in the first and 14% in the second. You can tell it made an improvement.
What becomes hard is to know how large that improvement is relative to the "main" function, not the whole profile. It would be interesting that if you select a certain part of the trace, all child traces would (in brackets maybe?) have the ratio within the function which is currently focused too.
If there's already a way to get that info, I'm also very happy of course 👍
For now my workaround is calculating myself by dividing the number of samples of my optimised subfunction to the main function in both traces, which can give a percentage (583/1611, 36.19% in one and 538/1852, 29.05% in the other one).
The text was updated successfully, but these errors were encountered: