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?
String
String

Public companion functions

forLocalCapture

Added in 1.4.0-alpha04
fun forLocalCapture(targetPackageName: String, startupMode: StartupMode?): Metric.CaptureInfo

Constructs a CaptureInfo for a local run on the current device, from the current process.

Public constructors

CaptureInfo

Added in 1.4.0-alpha04
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-alpha04
val artMainlineVersionLong?

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

If null, ART version is unknown. This should only occur if capturing metrics from a fixed trace, where the ART version is unknown.

startupMode

Added in 1.2.0
val startupModeStartupMode?

targetPackageName

Added in 1.2.0
val targetPackageNameString

testPackageName

Added in 1.2.0
val testPackageNameString