CompilationMode.Partial

@RequiresApi(value = 24)
public final class CompilationMode.Partial extends CompilationMode


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(
    @NonNull BaselineProfileMode baselineProfileMode,
    @IntRange(from = 0) int warmupIterations
)

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 warmupIterations times before compilation, to prepare

@NonNull String

Public constructors

Partial

Added in 1.1.0
public Partial(
    @NonNull BaselineProfileMode baselineProfileMode,
    @IntRange(from = 0) int warmupIterations
)

Public methods

getBaselineProfileMode

Added in 1.1.0
public final @NonNull BaselineProfileMode getBaselineProfileMode()

Controls whether a Baseline Profile should be used to partially pre compile the app.

Defaults to BaselineProfileMode.Require

getWarmupIterations

Added in 1.1.0
public final int getWarmupIterations()

If greater than 0, your macrobenchmark will run an extra warmupIterations times before compilation, to prepare

toString

public @NonNull String toString()