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(
    apiLevel: Int,
    targetPackageName: String,
    testPackageName: String,
    startupMode: StartupMode?,
    artMainlineVersion: Long?
)

Public properties

Int

Build.VERSION.SDK_INT at time of capture.

Long?

ART mainline version, or -1 if on a OS version without ART mainline (<30).

StartupMode?

StartupMode for the target application, if the app was forced to launch in a specific state, null otherwise.

String

Package name of the app process being measured.

String

Package name of the test/benchmarking process.

Public companion functions

forLocalCapture

Added in 1.4.0-alpha07
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, null otherwise.

Public constructors

CaptureInfo

Added in 1.4.0-alpha07
CaptureInfo(
    apiLevel: Int,
    targetPackageName: String,
    testPackageName: String,
    startupMode: StartupMode?,
    artMainlineVersion: Long? = expectedArtMainlineVersion(apiLevel)
)

Public properties

apiLevel

Added in 1.2.0
val apiLevelInt

Build.VERSION.SDK_INT at time of capture.

artMainlineVersion

Added in 1.4.0-alpha07
val artMainlineVersionLong?

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

Added in 1.2.0
val startupModeStartupMode?

StartupMode for the target application, if the app was forced to launch in a specific state, null otherwise.

targetPackageName

Added in 1.2.0
val targetPackageNameString

Package name of the app process being measured.

testPackageName

Added in 1.2.0
val testPackageNameString

Package name of the test/benchmarking process.