devtools
Add profile stats to the CPU profiler
#5340
Merged

Add profile stats to the CPU profiler #5340

kenzieschmoll
kenzieschmoll2 years ago

Work towards #3861

Screenshot 2023-03-01 at 4 19 54 PM
Screenshot 2023-03-01 at 4 19 41 PM

While I was here, I also created a new file profiler_controls.dart and pulled some controls from cpu_profiler.dart out into the new file. This was to make the cpu_profiler.dart file more manageable.

kenzieschmoll Add profile stats to the CPU profiler
c83fc08f
kenzieschmoll kenzieschmoll requested a review from bkonyi bkonyi 2 years ago
kenzieschmoll kenzieschmoll requested a review 2 years ago
kenzieschmoll
kenzieschmoll commented on 2023-03-02
packages/devtools_app/lib/src/screens/profiler/cpu_profiler.dart
365367 }
366368}
367369
368
class DisplayTreeGuidelinesToggle extends StatelessWidget {
kenzieschmoll2 years ago

all the deletes over here were moved to profiler_controls.dart with no functional changes. git diff picked this up weird unfortunately.

kenzieschmoll
kenzieschmoll commented on 2023-03-02
packages/devtools_app/lib/src/screens/profiler/cpu_profiler.dart
366368}
367369
368class DisplayTreeGuidelinesToggle extends StatelessWidget {
369 const DisplayTreeGuidelinesToggle();
370// TODO(kenz): one improvement we could make on this is to show the denominator
371
// for filtered profiles (e.g. 'Sample count: 10/14), or to at least show the
kenzieschmoll2 years ago

review all the additions from here to the bottom of the file as new code - not a modification of code on the left.

kenzieschmoll
kenzieschmoll commented on 2023-03-02
packages/devtools_app/lib/src/screens/profiler/panes/controls/profiler_controls.dart
1
// Copyright 2019 The Chromium Authors. All rights reserved.
kenzieschmoll2 years ago

no functional changes to this file. all moves from cpu_profiler.dart

kenzieschmoll fix pr link
7f51949b
bkonyi
bkonyi approved these changes on 2023-03-02
bkonyi2 years ago

LGTM with a couple of comments

Conversation is marked as resolved
Show resolved
packages/devtools_app/lib/src/screens/profiler/panes/controls/profiler_controls.dart
1
// Copyright 2019 The Chromium Authors. All rights reserved.
bkonyi2 years ago

Copyright 2023

Conversation is marked as resolved
Show resolved
packages/devtools_app/test/cpu_profiler/cpu_profiler_test.dart
148151 expect(find.byType(TabBar), findsOneWidget);
149152 expect(find.byKey(CpuProfiler.dataProcessingKey), findsNothing);
150153 expect(find.byType(CpuBottomUpTable), findsOneWidget);
154
expect(find.byType(CpuProfileStats), findsOneWidget);
bkonyi2 years ago

Do we want a test that checks the values are rendered properly?

kenzieschmoll review comments and test
5f2ebbfc
kenzieschmoll kenzieschmoll merged 9c64771d into master 2 years ago
kenzieschmoll kenzieschmoll deleted the cpu-stats branch 2 years ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone