CompilationMode.Partial
public final class CompilationMode.Partial extends CompilationMode
| java.lang.Object | ||
| ↳ | androidx.benchmark.macro.CompilationMode | |
| ↳ | androidx.benchmark.macro.CompilationMode.Partial |
Partial ahead-of-time app compilation.
The default parameters for this mimic the default state of an app partially pre-compiled by the installer - such as via Google Play.
Either baselineProfileMode must be set to non-BaselineProfileMode.Disable, or warmupIterations must be set to a non-0 value.
Note: [baselineProfileMode] = [BaselineProfileMode.Require] is only supported for APKs that have the ProfileInstaller library included, and have been built by AGP 7.0+ to package the baseline profile in the APK.
Summary
Public constructors |
|---|
Partial( |
Public methods |
|
|---|---|
final @NonNull BaselineProfileMode |
Controls whether a Baseline Profile should be used to partially pre compile the app. |
final int |
If greater than 0, your macrobenchmark will run an extra |
@NonNull String |
toString() |
Public constructors
Partial
public Partial(
@NonNull BaselineProfileMode baselineProfileMode,
@IntRange(from = 0) int warmupIterations
)
Public methods
getBaselineProfileMode
public final @NonNull BaselineProfileMode getBaselineProfileMode()
Controls whether a Baseline Profile should be used to partially pre compile the app.
Defaults to BaselineProfileMode.Require
| See also | |
|---|---|
BaselineProfileMode |
getWarmupIterations
public final int getWarmupIterations()
If greater than 0, your macrobenchmark will run an extra warmupIterations times before compilation, to prepare