Conversation
4a3dfeb to
67fc35a
Compare
dnfield
left a comment
There was a problem hiding this comment.
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.
Is there some way we can avoid packaging a native binary with this?
There was a problem hiding this comment.
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.
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.
Is CIPD accessible for anybody? Or is this packages only meant for "internal" use?
There was a problem hiding this comment.
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.
(public is readable by all)
packages/measure/README.md
Outdated
There was a problem hiding this comment.
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...?
| void _checkDevice() { | ||
| _device = argResults[kOptionDevice]; | ||
| if (_device == null) { | ||
| final ProcessResult result = Process.runSync('flutter', <String>['devices']); |
There was a problem hiding this comment.
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.
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.
Please make this a full sentence, starting with a capital and ending with a period. E.g. Specifies the path to the TraceUtility binary... (...)..
| help: | ||
| 'the process name used for filtering the instruments CPU measurements', | ||
| defaultsTo: kDefaultProccessName, | ||
| ); |
| @@ -0,0 +1,28 @@ | |||
| # Install | |||
There was a problem hiding this comment.
Add a section explaining what this packages does / what it is for?
packages/measure/README.md
Outdated
There was a problem hiding this comment.
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.
Ready for another round of review.
| @@ -0,0 +1,28 @@ | |||
| # Install | |||
packages/measure/README.md
Outdated
| kOptionOutJson, | ||
| abbr: 'o', | ||
| help: 'json file for the measure result.', | ||
| help: 'Specifies the json file for outputing result.', |
|
Can you remove the binary files from this PR now? |
liyuqian
left a comment
There was a problem hiding this comment.
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.', |
|
@dnfield : ready to review again 😄 |
For flutter/flutter#39439 and flutter/flutter#33899