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

Add Method Table to CPU profiler #5366

Merged
merged 11 commits into from
Mar 9, 2023
Merged

Conversation

kenzieschmoll
Copy link
Member

@kenzieschmoll kenzieschmoll commented Mar 8, 2023

Fixes #841

Screenshot 2023-03-08 at 3 28 25 PM

author Kenzie Schmoll <kenzieschmoll@google.com> 1678230010 -0800
committer Kenzie Schmoll <kenzieschmoll@google.com> 1678235124 -0800

parent ee98f44
author Kenzie Schmoll <kenzieschmoll@google.com> 1678230010 -0800
committer Kenzie Schmoll <kenzieschmoll@google.com> 1678235093 -0800

Make FlatTable scrollable when there is a single wide column

revert test change

fix up table

formatting

formatting

size method table to fit

Add Method Table to the CPU Profiler
@kenzieschmoll kenzieschmoll marked this pull request as ready for review March 8, 2023 23:24
@kenzieschmoll kenzieschmoll requested a review from a team as a code owner March 8, 2023 23:24
@kenzieschmoll kenzieschmoll requested review from bkonyi and removed request for a team March 8, 2023 23:24
@@ -38,6 +39,8 @@ class CpuMethodTable extends StatelessWidget {
}
}

// TODO(kenz): ensure that this table automatically scrolls to the selected
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this happen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you select a method from anywhere in the method graph (callees and callers), the graph reroots to that method, which means the method table should scroll to the new selection. We may eventually want to maintain some sort of history here for this reason.

.round(),
);
/// The number of cpu samples where this method is on top of the stack.
int get selfCount => _selfCount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this just be final int selfCount? Ditto for totalCount.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_selfCount and _totalCount are non-final because they are modified in the merge method.

@kenzieschmoll kenzieschmoll merged commit 695dfd6 into flutter:master Mar 9, 2023
@kenzieschmoll kenzieschmoll deleted the mt branch March 9, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants