-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add a new package: measure #31
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
4a3dfeb to
67fc35a
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.
A few changes in the comments.
I would prefer not shipping the binary as a resource - we could have it as a pre-requisite instead, and just install it on the bots we need it on.
Alternatively, we could make it be a CIPD package and have this tool fetch it from CIPD if needed (although I'd still probably prefer we just make it a CIPD package and have the bot fetch it via CIPD before running this tool if needed).
packages/measure/README.md
Outdated
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 some way we can avoid packaging a native binary with this?
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.
Not that I know of... This is probably due to my lack of iOS/Xcode/instruments knowledge. I'm happy to remove this binary if someone can parse the trace without using this binary.
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.
Just discussed with Dan offline. We can use CIPD to serve the binary instead of uploading it to git.
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 CIPD accessible for anybody? Or is this packages only meant for "internal" use?
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.
We have both a public and an internal one. This should be fine for public. Public is at https://chrome-infra-packages.appspot.com/p/flutter, internal is https://chrome-infra-packages.appspot.com/p/flutter_internal
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.
(public is readable by all)
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.
packages/measure/README.md
Outdated
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 language will become outdated and probably not get updated. Can we just say something like Sample output: and get rid of the whole Eventually, we'd like to hook this...?
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.
| void _checkDevice() { | ||
| _device = argResults[kOptionDevice]; | ||
| if (_device == null) { | ||
| final ProcessResult result = Process.runSync('flutter', <String>['devices']); |
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.
GitHub lost some comments :(
I think we should not do this. Flutter tool output is not guarnateed to be stable, and an upstream change could easily break this unintentionally. I would recommend making the device argument be required, and callers could use flutter devices or whatever other method to call it (in the devicelab, we know the device ID we're supposed to target anyway).
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've already let the devicelab provide the deviceId in flutter/flutter#39439
However, I'd like my local use and test to be a little easier (see the last test in measure_test.dart).
I've now removed the flutter and instead used instruments to find the deviceId.
| kOptionTraceUtility, | ||
| abbr: 'u', | ||
| help: | ||
| 'path to TraceUtility binary (https://github.com/Qusic/TraceUtility)', |
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.
Please make this a full sentence, starting with a capital and ending with a period. E.g. Specifies the path to the TraceUtility binary... (...)..
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.
| help: | ||
| 'the process name used for filtering the instruments CPU measurements', | ||
| defaultsTo: kDefaultProccessName, | ||
| ); |
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.
ditto
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.
| @@ -0,0 +1,28 @@ | |||
| # Install | |||
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.
Add a section explaining what this packages does / what it is for?
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.
packages/measure/README.md
Outdated
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 CIPD accessible for anybody? Or is this packages only meant for "internal" use?
liyuqian
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.
Ready for another round of review.
| @@ -0,0 +1,28 @@ | |||
| # Install | |||
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.
packages/measure/README.md
Outdated
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.
| kOptionOutJson, | ||
| abbr: 'o', | ||
| help: 'json file for the measure result.', | ||
| help: 'Specifies the json file for outputing result.', |
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.
for result output.
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.
|
Can you remove the binary files from this PR now? |
liyuqian
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.
Oops, forget to git rm -r resources. Now they should have been removed.
| kOptionOutJson, | ||
| abbr: 'o', | ||
| help: 'json file for the measure result.', | ||
| help: 'Specifies the json file for outputing result.', |
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.
|
@dnfield : ready to review again 😄 |
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!
For flutter/flutter#39439 and flutter/flutter#33899