-
Notifications
You must be signed in to change notification settings - Fork 222
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
Call View Panel #4678
Call View Panel #4678
Conversation
🤖 Meticulous spotted visual differences in 241 of 336 screens tested: view and approve differences detected. Last updated for commit 3a1b402. This comment will update as new commits are pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do a few things differently:
- we should not go further down the path where the function name is the only identifying factor of a line (going further down this path means we won't be able to do
group by
s) - we can get the caller callee relationships easier than implemented here, we can just keep the "previous row number" when we iterate through the stack and then at every step adjust the callees of the previous row
- we should build the relationships directly as row numbers instead of function names
pkg/query/table.go
Outdated
@@ -187,8 +192,8 @@ type tableBuilder struct { | |||
cumulative int64 | |||
addresses map[string]map[uint64]int | |||
functions map[string]int | |||
callers map[string]map[string]bool | |||
callees map[string]map[string]bool | |||
callers map[int]map[int]bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for bool
here, just make this a set by using map[int]struct{}
} | ||
|
||
return tb | ||
} | ||
|
||
func (tb *tableBuilder) populateCallerAndCalleeData() { | ||
for i := range tb.builderFunctionName.Len() { | ||
if len(tb.callers) > i { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a comment explaining these if statements, if I understand correctly, I think we need it to protect against the case where we didn't expand the callers to the row number (let's say the last row in the flamegraph table doesn't have callers or callees)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, added comments on these conditions.
Screencast:
call-view-1.mov