Metric.CaptureInfo
@ExperimentalMetricApi
public final class Metric.CaptureInfo
Contextual information about the environment where metrics are captured, such as apiLevel and targetPackageName.
Summary
Public constructors |
|---|
CaptureInfo( |
Public methods |
|
|---|---|
static final @NonNull Metric.CaptureInfo |
forLocalCapture(Constructs a CaptureInfo for a local run on the current device, from the current process. |
final int |
|
final Long |
ART mainline version, or |
final StartupMode |
StartupMode for the target application, if the app was forced to launch in a specific state, |
final @NonNull String |
Package name of the app process being measured. |
final @NonNull String |
Package name of the test/benchmarking process. |
Public constructors
CaptureInfo
public CaptureInfo(
int apiLevel,
@NonNull String targetPackageName,
@NonNull String testPackageName,
StartupMode startupMode,
Long artMainlineVersion
)
Public methods
forLocalCapture
public static final @NonNull Metric.CaptureInfo forLocalCapture(
@NonNull String targetPackageName,
StartupMode startupMode
)
Constructs a CaptureInfo for a local run on the current device, from the current process.
| Parameters | |
|---|---|
@NonNull String targetPackageName |
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, |
getArtMainlineVersion
public final Long getArtMainlineVersion()
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.
getStartupMode
public final StartupMode getStartupMode()
StartupMode for the target application, if the app was forced to launch in a specific state, null otherwise.
getTargetPackageName
public final @NonNull String getTargetPackageName()
Package name of the app process being measured.
getTestPackageName
public final @NonNull String getTestPackageName()
Package name of the test/benchmarking process.