Skip to content

Conversation

@akoeplinger
Copy link
Member

No description provided.

Copy link
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@premun premun left a comment

Choose a reason for hiding this comment

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

Didn't mean to intrude but I was curious in how we measure the startup in iOS.

The new --no-wait could simplify the code a bit I think but I understand that this is working and is totally fine.

os.remove(file)

cmdline = xharnesscommand() + [self.devicetype, 'state', '--adb']
cmdline = xharnesscommand() + ['android', 'state', '--adb']
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason that we are moving to the hardcoded value here, when we know that the value will be android because of the elif block?

Copy link
Member Author

Choose a reason for hiding this comment

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

basically because of that, it is always android in that block so using a variable is just slightly harder to read IMO.

Copy link
Member

@premun premun May 2, 2022

Choose a reason for hiding this comment

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

Also apple/wasm state --adb is not a valid command so it is imho better to hardcode.

That being said, you could now utilize the android adb command directly and this call and some other below can be removed. You don't need to now get ADB's location from adb.stdout.strip() and call

xharnesscommand() + ['android', 'adb', '--', 'shell', 'vm', 'size']

I'd even maybe add adbcommand() that would do xharnesscommand() + ['android', 'adb', '--']

'log',
'collect',
'--device',
'--start', runCmdTimestamp.strftime("%Y-%m-%d %H:%M:%S"),
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we just get this time from the device itself, so that way we would not be reliant on the two clocks being in sync?

Copy link
Member Author

Choose a reason for hiding this comment

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

@DrewScoggins sorry, didn't see this comment until now. There's not an easy way to get the time from the device (at least that I know of).

One thing that might be a better option would be to do an initial log collect and look at the timestamp of the last event in there as our starting point. We can do that if it ever becomes a problem, iPhones/Macs usually do a good job of keeping the time in sync with a timeserver as long as they have Internet connectivity.

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.

5 participants