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
This commit is contained in:
Jeff DeCew
2023-07-24 14:30:15 -04:00
parent fb620579f7
commit 1f89e284a4

View File

@@ -16,6 +16,7 @@
package com.android.systemui.dump package com.android.systemui.dump
import android.icu.text.SimpleDateFormat
import android.os.SystemClock import android.os.SystemClock
import android.os.Trace import android.os.Trace
import com.android.systemui.ProtoDumpable import com.android.systemui.ProtoDumpable
@@ -32,6 +33,7 @@ import java.io.BufferedOutputStream
import java.io.FileDescriptor import java.io.FileDescriptor
import java.io.FileOutputStream import java.io.FileOutputStream
import java.io.PrintWriter import java.io.PrintWriter
import java.util.Locale
import javax.inject.Inject import javax.inject.Inject
import kotlin.system.measureTimeMillis import kotlin.system.measureTimeMillis
@@ -106,6 +108,8 @@ constructor(
return return
} }
pw.print("Dump starting: ")
pw.println(DATE_FORMAT.format(System.currentTimeMillis()))
when { when {
parsedArgs.dumpPriority == PRIORITY_ARG_CRITICAL -> dumpCritical(pw, parsedArgs) parsedArgs.dumpPriority == PRIORITY_ARG_CRITICAL -> dumpCritical(pw, parsedArgs)
parsedArgs.dumpPriority == PRIORITY_ARG_NORMAL && !parsedArgs.proto -> { 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 PRIORITY_OPTIONS = arrayOf(PRIORITY_ARG_CRITICAL, PRIORITY_ARG_NORMAL)
private val COMMANDS = private val COMMANDS =