Metric.CaptureInfo
@ExperimentalMetricApi
class Metric.CaptureInfo
Contextual information about the environment where metrics are captured, such as apiLevel and targetPackageName.
Summary
Public companion functions |
|
|---|---|
Metric.CaptureInfo |
forLocalCapture(targetPackageName: String, startupMode: StartupMode?)Constructs a CaptureInfo for a local run on the current device, from the current process. |
Public constructors |
|---|
CaptureInfo( |
Public properties |
|
|---|---|
Int |
|
Long? |
ART mainline version, or |
StartupMode? |
StartupMode for the target application, if the app was forced to launch in a specific state, |
String |
Package name of the app process being measured. |
String |
Package name of the test/benchmarking process. |
Public companion functions
forLocalCapture
fun forLocalCapture(targetPackageName: String, startupMode: StartupMode?): Metric.CaptureInfo
Constructs a CaptureInfo for a local run on the current device, from the current process.
| Parameters | |
|---|---|
targetPackageName: String |
Package name of the app being measured. |
startupMode: StartupMode? |
StartupMode for the target application, if the app was forced to launch in a specific state, |
Public constructors
CaptureInfo
CaptureInfo(
apiLevel: Int,
targetPackageName: String,
testPackageName: String,
startupMode: StartupMode?,
artMainlineVersion: Long? = expectedArtMainlineVersion(apiLevel)
)
Public properties
artMainlineVersion
val artMainlineVersion: Long?
ART mainline version, or -1 if on a OS version without ART mainline (<30). null if captured from a fixed trace, where mainline version is unknown.
startupMode
val startupMode: StartupMode?
StartupMode for the target application, if the app was forced to launch in a specific state, null otherwise.
targetPackageName
val targetPackageName: String
Package name of the app process being measured.
testPackageName
val testPackageName: String
Package name of the test/benchmarking process.