-
Notifications
You must be signed in to change notification settings - Fork 327
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
Support for ADB (Android Java memory info), multiple charts, Display … #1553
Conversation
0deaf68
to
57ed3f1
Compare
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 with first round of comments. Also, please add tests.
|
||
_timelineSlider = Slider.adaptive( | ||
label: timelineSliderLabel(controller.sliderValue), | ||
activeColor: Colors.indigoAccent, |
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.
can you use a color from Theme.of(context) instead? or just use the default (which I assume would be the same color as the switch on the timeline page)?
packages/devtools_app/lib/src/memory/flutter/memory_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/memory/flutter/memory_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/memory/flutter/memory_protocol.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/memory/flutter/memory_protocol.dart
Outdated
Show resolved
Hide resolved
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.
lgtm from me with some nits.
I'm fine with adding tests as a followup cl as this cl is already large. lets figure out how to test this code more productively than we have in the past perhaps by writing flutter widget tests that talk to a real vm service.
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.
…interval, updated exported JSON format, and beginning of timeline slider.
…lso dispose handling.
…djust based on media qidth.
…and Linux using text line height.
c52b6fe
to
613f37a
Compare
Features added in this PR:
Memory View now has the ability to display collected ADB memory statistics (Java Heap).
On startup the Memory Profile View is displayed with a chart of the collect Dart VM memory statistics:
Clicking on the Android Memory button
Will display a second chart of Android's memory e.g.,
Other
Other private memory usage corresponds to the Private Other field output in the App Summary.Android Studio: Memory used by the app that the system isn't sure how to categorize.
System
Shared and system memory usage in kB. This corresponds to the System field output in the App Summary.
Note: The Other trace (plot in the chart) is the combined values of Other and System.
Code
The memory usage for static code and resources corresponds to the Code field in the App Summary..Android Studio: Memory that your app uses for code and resources, such as dex byte code, optimized or compiled dex code, .so libraries, and fonts.
Native Heap
The private Native Heap usage corresponds to the Native Heap field in the App Summary.Android Studio: Memory from objects allocated from C or C++ code. Even if you're not using C++ in your app, you might see some native memory used here because the Android framework uses native memory to handle various tasks on your behalf, such as when handling image assets and other graphics—even though the code you've written is in Java or Kotlin.
Java Heap
The private Java Heap usage corresponds to the Java Heap field in the App Summary. Android Studio: Memory from objects allocated from Java or Kotlin code.
Stack
The stack usage corresponds to the Stack field in the App Summary.Android Studio: Memory used by both native and Java stacks in your app. This usually relates to how many threads your app is running.
Graphics
The graphics usage corresponds to the Graphics field in the App Summary.Android Studio: Memory used for graphics buffer queues to display pixels to the screen, including GL surfaces, GL textures, and so on. (Note that this is memory shared with the CPU, not dedicated GPU memory.)
Display Interval Feature
The display interval is a drop-down setting the viewport of the chart to a period of time e.g., 1 minute, 5 minutes, 10 minutes or all minutes.
Graceful resize of button/drop-downs for compact displays normally for wide DevTools app the toolbar is:
As the application's width narrows portions of the memory actions (buttons and drop-downs) will narrow (icon only) the first is the left-side buttons e.g.,
Then the right-side buttons e.g.,
And, finally the drop-downs narrow e.g.,
The JSON format of collected memory statistics is: