-
Notifications
You must be signed in to change notification settings - Fork 29.7k
add a profile() method #11443
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 a profile() method #11443
Conversation
| import 'package:flutter/foundation.dart'; | ||
| import 'package:test/test.dart'; | ||
|
|
||
| const bool isReleaseMode = const bool.fromEnvironment("dart.vm.product"); |
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.
fwiw, now that i think of this some more: this will always be false. We run all our tests in debug mode always.
| }); | ||
| expect(count, isReleaseMode ? 0 : 1); | ||
| }); | ||
| } |
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.
There's really no good way for us to test that profile actually omits the code in release builds in the current infrastructure. At some point we should probably do a real test for this.
|
Makes sense; added |
* Revert "Make plugins add their repos to projects in the consuming app (#11447)" This reverts commit abe1e25. * Revert "Support for custom build types on Android (#11354)" This reverts commit 87eec71. * Revert "add a profile() method (#11443)" This reverts commit 561d17a. * Revert "Fix documentation based on dartdoc's warnings (#11428)" This reverts commit 6655074. * Revert "Improve some docs around WillPopScope. (#11429)" This reverts commit 58a28a2. * Revert "temporarily disable broken driver test in integration_ui (#11440)" This reverts commit 764515e. * Revert "style fix" This reverts commit 00bfc86. * Revert "tests for waitFor/waitForAbsent" This reverts commit 31d2ee9. * Revert "Always evaluate the finder in `driver.waitFor()` and `driver.waitForAbsent()`" This reverts commit 11d7c79.
profile()method - it will only execute the given function in debug or profile modes