Add VMService command to get frame rasterization metrics#100696
Add VMService command to get frame rasterization metrics#100696fluttergithubbot merged 5 commits intoflutter:masterfrom
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.
LGTM.
@christopherfujino should get a chance to take a look too.
christopherfujino
left a comment
There was a problem hiding this comment.
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.
Can you also add a successful test where the stats are logged?
|
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