From 1f89e284a4a6e0d835bfa2263331cae5f0471dbc Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Mon, 24 Jul 2023 14:30:15 -0400 Subject: [PATCH] Print when the sysui dump actually starts. This highlights that the CRITICAL dumps are captured within 2-3s of starting the bugreport, while NORMAL dumps can sometimes take a couple minutes to start being collected. Test: adb bugreport -> ABT Bug: 292221335 Change-Id: I49cbbd17a0b73505d4911abea364bb88b95144d5 --- .../SystemUI/src/com/android/systemui/dump/DumpHandler.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/dump/DumpHandler.kt b/packages/SystemUI/src/com/android/systemui/dump/DumpHandler.kt index 6ebd351fff04e..ae40f7e8d7c03 100644 --- a/packages/SystemUI/src/com/android/systemui/dump/DumpHandler.kt +++ b/packages/SystemUI/src/com/android/systemui/dump/DumpHandler.kt @@ -16,6 +16,7 @@ package com.android.systemui.dump +import android.icu.text.SimpleDateFormat import android.os.SystemClock import android.os.Trace import com.android.systemui.ProtoDumpable @@ -32,6 +33,7 @@ import java.io.BufferedOutputStream import java.io.FileDescriptor import java.io.FileOutputStream import java.io.PrintWriter +import java.util.Locale import javax.inject.Inject import kotlin.system.measureTimeMillis @@ -106,6 +108,8 @@ constructor( return } + pw.print("Dump starting: ") + pw.println(DATE_FORMAT.format(System.currentTimeMillis())) when { parsedArgs.dumpPriority == PRIORITY_ARG_CRITICAL -> dumpCritical(pw, parsedArgs) parsedArgs.dumpPriority == PRIORITY_ARG_NORMAL && !parsedArgs.proto -> { @@ -488,6 +492,7 @@ constructor( } } +private val DATE_FORMAT = SimpleDateFormat("MM-dd HH:mm:ss.SSS", Locale.US) private val PRIORITY_OPTIONS = arrayOf(PRIORITY_ARG_CRITICAL, PRIORITY_ARG_NORMAL) private val COMMANDS =