Skip to content

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian force-pushed the measure branch 2 times, most recently from 4a3dfeb to 67fc35a Compare August 30, 2019 00:08
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.

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

Copy link
Contributor

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?

Copy link
Contributor Author

@liyuqian liyuqian Aug 30, 2019

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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor

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

Copy link
Contributor

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)

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

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...?

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.

void _checkDevice() {
_device = argResults[kOptionDevice];
if (_device == null) {
final ProcessResult result = Process.runSync('flutter', <String>['devices']);
Copy link
Contributor

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

Copy link
Contributor Author

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)',
Copy link
Contributor

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... (...)..

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.

help:
'the process name used for filtering the instruments CPU measurements',
defaultsTo: kDefaultProccessName,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

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.

@@ -0,0 +1,28 @@
# Install
Copy link
Member

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?

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
Member

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?

Copy link
Contributor Author

@liyuqian liyuqian left a 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
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 Author

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.',
Copy link
Contributor

Choose a reason for hiding this comment

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

for result output.

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.

@dnfield
Copy link
Contributor

dnfield commented Sep 5, 2019

Can you remove the binary files from this PR now?

Copy link
Contributor Author

@liyuqian liyuqian left a 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.',
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.

@liyuqian
Copy link
Contributor Author

liyuqian commented Sep 9, 2019

@dnfield : ready to review again 😄

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants