# 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)

*** ** * ** ***


```
class BaselineProfileConfig
```

<br />

*** ** * ** ***

## Summary

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

| ### Public functions |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getFilterPredicate()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getMaxIterations()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getOutputFilePrefix()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getPackageName()()` |
| `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/MacrobenchmarkScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getProfileBlock()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#getStableIterations()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#isIncludeInStartupProfile()()` Determines whether the generated profile should be also used as a startup profile. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/macro/BaselineProfileConfig#isStrictStability()()` |

## Public functions

### getFilterPredicate

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

```
fun getFilterPredicate(): (String) -> Boolean
```

| Returns |
|---|---|
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.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)

```
fun getMaxIterations(): Int
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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)

```
fun getOutputFilePrefix(): String?
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.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)

```
fun getPackageName(): String
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.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)

```
fun getProfileBlock(): MacrobenchmarkScope.() -> Unit
```

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun getStableIterations(): Int
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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)

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

```
fun isStrictStability(): Boolean
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` iff we enforce that the generated profile was stable |