-
Notifications
You must be signed in to change notification settings - Fork 280
Implement iOS startup time tracing #2355
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
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
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.
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.
@@ -327,7 +329,7 @@ def run(self): | |||
getLogger().info("Removed: " + os.path.join(const.TRACEDIR, file)) | |||
os.remove(file) | |||
|
|||
cmdline = xharnesscommand() + [self.devicetype, 'state', '--adb'] | |||
cmdline = xharnesscommand() + ['android', 'state', '--adb'] |
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 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?
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.
basically because of that, it is always android
in that block so using a variable is just slightly harder to read IMO.
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.
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"), |
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.
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?
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.
@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.
No description provided.