-
Notifications
You must be signed in to change notification settings - Fork 324
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 instrumentation to measure performance and improve UX of snapshotting. #8138
base: master
Are you sure you want to change the base?
Conversation
@@ -86,9 +87,13 @@ class SnapshotDataItem extends SnapshotItem | |||
|
|||
Future<void> loadHeap(HeapGraphLoader loader) async { | |||
assert(_heap == null); | |||
SnapshotTimer.instance.maybePrint('Loading'); |
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.
instead of creating a new timer class, we should just record this timing information to our analytics. We could either use the ga.timeAsync methods, or we could create local variables to record the time and then send a single analytics event with the timing profile info.
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.
This class is designed to see numbers for a concrete local experimental run.
Can our analytics be used for this goal?
If yes, where can I find steps?
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.
If the only goal is to add a way to print timing information for local development, then we can use the existing helpers debugTimeSync
and debugTimeAsync
: https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/shared/development_helpers.dart/#L267-L297
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.
These two classes give just one number and require separate function.
I do not want to do refactoring, I want to be able to put checkpoints in any places.
I moved the class DebugTimer to be at the same place as these two, and added documentation.
No description provided.