Skip to content

Conversation

@iskakaushik
Copy link
Contributor

@iskakaushik iskakaushik commented Mar 24, 2022

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

@flutter-dashboard
Copy link

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.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 24, 2022
@iskakaushik
Copy link
Contributor Author

cc: @gaaclarke

@iskakaushik iskakaushik changed the title [WIP] Add command to get jank debug info Add VMService command to get frame rasterization metrics Apr 14, 2022
@iskakaushik iskakaushik requested a review from dnfield April 14, 2022 16:58
Copy link
Contributor

@dnfield dnfield left a 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.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method: 'getVMTimeline',
errorCode: RPCErrorCodes.kServiceDisappeared,
),
const FakeVmServiceRequest(
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@christopherfujino
Copy link
Contributor

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)

@iskakaushik
Copy link
Contributor Author

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 :-)

@fluttergithubbot fluttergithubbot merged commit aeaeded into flutter:master Apr 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants