-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add VMService command to get frame rasterization metrics #100696
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
cc: @gaaclarke |
8aaccd8 to
51a25f5
Compare
dnfield
left a comment
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.
@christopherfujino should get a chance to take a look too.
christopherfujino
left a comment
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 is really cool!
Can you add an entry for this to https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/command_help.dart#L164, and also print it https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/resident_runner.dart#L1433
| method: 'getVMTimeline', | ||
| errorCode: RPCErrorCodes.kServiceDisappeared, | ||
| ), | ||
| const FakeVmServiceRequest( |
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 also add a successful test where the stats are logged?
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!
christopherfujino
left a comment
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!
|
Looks like we test the command help output in (file:///b/s/w/ir/x/w/flutter/packages/flutter_tools/test/general.shard/resident_runner_test.dart:1312:5) |
yup, just noticed and fixed it :-) |
This change lets the user type in 'j' / 'J' (short for jank) to retrieve the raster metrics for the last frame held by the rasterizer. This is typically the frame currently being seen by the user. The result is dumped to a file in the app-directory like so:
flutter_jank_metrics_01.json.An example of one such file is: https://gist.github.com/iskakaushik/c4117c8533828f3ed89495d3f23f8fa0
This file can be visualized as the user pleases, one such location is: https://iska.is/jank64