catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.93k stars 563 forks source link

Add option to capture complete logcat on android #3110

Open boliu opened 7 years ago

boliu commented 7 years ago

When a test runs and fails, would like the ability to return the complete logs from an android device since when the test started running. Only a crash stack, or the few lines before failure sometimes isn't enough information to debug a problem.

anniesullie commented 7 years ago

@case540 @nedn @ehanley324

jbudorick commented 7 years ago

Is this referring to perf tests or functional tests?

boliu commented 7 years ago

Context is this google-internal bug: https://bugs.chromium.org/p/chromium/issues/detail?id=664341#c116

It's the webgl conformance tests

anniesullie commented 7 years ago

@jbudorick Sorry for the too-fast labeling!

jbudorick commented 7 years ago

@anniesullie the webgl conformance tests are functional tests that run via telemetry, so your labeling may have been correct.

Regardless, devil definitely already supports this kind of capturing.

ehanley324 commented 7 years ago

We are currently working on how to better surface stack traces for android in telemetry.

Can you be more specific about what devil supports? Are you just saying it supports capturing more of the logcat than 500 lines (which is what telemetry currently grabs).

jbudorick commented 7 years ago

Devil supports logcat via:

ehanley324 commented 7 years ago

Ok so you are just referring to solving the problem of getting all of the logcat instead of just 500 lines. We still need to symbolize those within telemetry to get useful information in the telemetry logs.

We currently just use logcat (https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/platform/android_platform_backend.py?q=android_platform_backe&sq=package:chromium&l=697) so you are saying to get the full logcat we will need to use this wrapper.

nedn commented 7 years ago

Getting the full logcat since the start of the benchmark will be too much. Is there a way to reset the logcat? The following will help get all logcat needed to debug a crash of a story & no more:

Reset logcat to empty
Benchmark user story 1
Grab all logcat
Reset logcat to empty
Benchmark user story 1
Grab all logcat
Reset logcat to empty
...