# BaselineProfileConfig

Artifact: [androidx.benchmark:benchmark-macro](https://developer.android.com/jetpack/androidx/releases/benchmark) [View Source](https://cs.android.com/search?q=file:androidx/benchmark/macro/BaselineProfileConfig.kt+class:androidx.benchmark.macro.BaselineProfileConfig) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

*** ** * ** ***


```
public final class BaselineProfileConfig
```

<br />

*** ** * ** ***

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig.Builder` Can be used to build a `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig` instance. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getFilterPredicate()()` |
| `final int` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getMaxIterations()()` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getOutputFilePrefix()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getPackageName()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/benchmark/macro/MacrobenchmarkScope, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getProfileBlock()()` |
| `final int` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#getStableIterations()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#isIncludeInStartupProfile()()` Determines whether the generated profile should be also used as a startup profile. |
| `final boolean` | `https://developer.android.com/reference/androidx/benchmark/macro/BaselineProfileConfig#isStrictStability()()` |

## Public methods

### getFilterPredicate

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final @NonNull Function1<@NonNull String, @NonNull Boolean> getFilterPredicate()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html>` | the function used to filter individual rules / lines of the baseline profile. |

### getMaxIterations

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final int getMaxIterations()
```

| Returns |
|---|---|
| `int` | the maximum number of iterations to run when collecting profiles. |

### getOutputFilePrefix

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final String getOutputFilePrefix()
```

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | 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](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final @NonNull String getPackageName()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | The Package name of the app for which profiles are to be generated. |

### getProfileBlock

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final @NonNull Function1<@NonNull MacrobenchmarkScope, Unit> getProfileBlock()
```

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/benchmark/macro/MacrobenchmarkScope, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>` | the he critical user journey. |

### getStableIterations

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
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](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
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](https://developer.android.com/jetpack/androidx/releases/benchmark#1.4.0)

```
public final boolean isStrictStability()
```

| Returns |
|---|---|
| `boolean` | `true` iff we enforce that the generated profile was stable |