BaselineProfileConfig


public final class BaselineProfileConfig


Summary

Nested types

Can be used to build a androidx.benchmark.macro.BaselineProfileConfig instance.

Public methods

final @NonNull Function1<@NonNull String, @NonNull Boolean>
final int
final String
final @NonNull String
final @ExtensionFunctionType @NonNull Function1<@NonNull MacrobenchmarkScopeUnit>
final int
final boolean

Determines whether the generated profile should be also used as a startup profile.

final boolean

Public methods

getFilterPredicate

Added in 1.4.0-beta02
public final @NonNull Function1<@NonNull String, @NonNull BooleangetFilterPredicate()
Returns
@NonNull Function1<@NonNull String, @NonNull Boolean>

the function used to filter individual rules / lines of the baseline profile.

getMaxIterations

Added in 1.4.0-beta02
public final int getMaxIterations()
Returns
int

the maximum number of iterations to run when collecting profiles.

getOutputFilePrefix

Added in 1.4.0-beta02
public final String getOutputFilePrefix()
Returns
String

An optional file name prefix used when creating the output file with the contents of the human readable baseline profile. For example: outputFilePrefix-baseline-prof.txt

getPackageName

Added in 1.4.0-beta02
public final @NonNull String getPackageName()
Returns
@NonNull String

The Package name of the app for which profiles are to be generated.

getProfileBlock

Added in 1.4.0-beta02
public final @ExtensionFunctionType @NonNull Function1<@NonNull MacrobenchmarkScopeUnitgetProfileBlock()
Returns
@ExtensionFunctionType @NonNull Function1<@NonNull MacrobenchmarkScopeUnit>

the he critical user journey.

getStableIterations

Added in 1.4.0-beta02
public final int getStableIterations()
Returns
int

the minimum number of iterations to observe as stable before assuming stability, and completing profile generation.

isIncludeInStartupProfile

Added in 1.4.0-beta02
public final boolean isIncludeInStartupProfile()

Determines whether the generated profile should be also used as a startup profile. A startup profile is utilized during the build process in order to determine which classes are needed in the primary dex to optimize the startup time. This flag should be used only for startup flows, such as main application startup pre and post login or other entry points of the app. Note that methods collected in a startup profiles are also utilized for baseline profiles.

isStrictStability

Added in 1.4.0-beta02
public final boolean isStrictStability()
Returns
boolean

true iff we enforce that the generated profile was stable