BaselineProfileConfig


class BaselineProfileConfig


Summary

Nested types

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

Public functions

(String) -> Boolean
Int
String?
String
MacrobenchmarkScope.() -> Unit
Int
Boolean

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

Boolean

Public functions

getFilterPredicate

Added in 1.4.0-beta02
fun getFilterPredicate(): (String) -> Boolean
Returns
(String) -> Boolean

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

getMaxIterations

Added in 1.4.0-beta02
fun getMaxIterations(): Int
Returns
Int

the maximum number of iterations to run when collecting profiles.

getOutputFilePrefix

Added in 1.4.0-beta02
fun getOutputFilePrefix(): String?
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
fun getPackageName(): String
Returns
String

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

getProfileBlock

Added in 1.4.0-beta02
fun getProfileBlock(): MacrobenchmarkScope.() -> Unit
Returns
MacrobenchmarkScope.() -> Unit

the he critical user journey.

getStableIterations

Added in 1.4.0-beta02
fun getStableIterations(): Int
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
fun isIncludeInStartupProfile(): Boolean

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
fun isStrictStability(): Boolean
Returns
Boolean

true iff we enforce that the generated profile was stable