-
Notifications
You must be signed in to change notification settings - Fork 23
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
Measure how memory is consumed by a test. #114
Conversation
pkgs/leak_tracker/test/tests/leak_tracking/end_to_end_test.dart
Outdated
Show resolved
Hide resolved
Widget _materialApp({int seed = 0}) => MaterialApp( | ||
home: SizedBox( | ||
height: | ||
10 + seed % 101, // We need some change to avoid constant values. |
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.
Do we need this modulo operation here? seed
is in [0, 9]
, so this won't ever do anything.
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.
The method is not aware about seed size, and in future it may change. So, leaving as is.
samples: 249 - 249 = 0 | ||
|
||
To set as new baseline, set parameter of MemoryBaselining: | ||
baseline: MemoryBaseline( |
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.
Is there any possible way that we can include the Dart SDK version in the MemoryBaseline
data? That way we can explicitly print a warning if a baseline from an older SDK is being used with a newer SDK.
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 this issue to be resolved: flutter/flutter#61814
Added comment.
Results for unit test in leak_tracker: