From 3ce0c27fd980b7dbb61d7120560f450ff0f82131 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 21 Feb 2019 10:59:20 -0800 Subject: [PATCH] Make logcat less chatty on perf tests (#28272) --- dev/devicelab/lib/framework/adb.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dev/devicelab/lib/framework/adb.dart b/dev/devicelab/lib/framework/adb.dart index 86aa04965c..3f0bbded58 100644 --- a/dev/devicelab/lib/framework/adb.dart +++ b/dev/devicelab/lib/framework/adb.dart @@ -296,7 +296,16 @@ class AndroidDevice implements Device { stream = StreamController( onListen: () async { await adb(['logcat', '--clear']); - final Process process = await startProcess(adbPath, ['-s', deviceId, 'logcat']); + final Process process = await startProcess( + adbPath, + // Make logcat less chatty by filtering down to just ActivityManager + // (to let us know when app starts), flutter (needed by tests to see + // log output), and fatal messages (hopefully catches tombstones). + // For local testing, this can just be: + // ['-s', deviceId, 'logcat'] + // to view the whole log, or just run logcat alongside this. + ['-s', deviceId, 'logcat', 'ActivityManager:I', 'flutter:V', '*:F'], + ); process.stdout .transform(utf8.decoder) .transform(const LineSplitter())