# Insight

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

*** ** * ** ***

Android/JVM
- android

  ```
  @ExperimentalInsightApi
  class Insight
  ```

*** ** * ** ***

Individual case of a problem identified in a given trace (from a specific iteration).

Benchmark output will summarize multiple insights, for example:

```kotlin
[JIT Activity](https://d.android.com/test#JIT_ACTIVITY) (expected: < 100000000ns)
seen in iterations: [6](file:///path/to/trace.perfetto-trace)(328462261ns),
```

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/ExperimentalInsightApi class https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight.Category` Category represents general expectations that have been violated by an insight - e.g. JIT shouldn't take longer than XX ms, or trampoline activities shouldn't be used. |
| `@https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/ExperimentalInsightApi interface https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight.Provider` |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#Insight(androidx.benchmark.traceprocessor.Insight.Category,kotlin.String,androidx.benchmark.traceprocessor.PerfettoTrace.Link)( category: https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight.Category, observedLabel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, traceLink: https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/PerfettoTrace.Link )` | android |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#hashCode()()` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#toString()()` | android |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight.Category` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#category()` Category of the Insight, representing the type of problem. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#observedLabel()` suffix after the deeplink to convey problem severity, e.g. "(100000000ns)" | android |
| `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/PerfettoTrace.Link` | `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight#traceLink()` Link to content within a trace to highlight for the given problem. | android |

## Public constructors

### Insight

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

```
Insight(
    category: Insight.Category,
    observedLabel: String,
    traceLink: PerfettoTrace.Link
)
```

## Public functions

### equals

android

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

android

```
open fun hashCode(): Int
```

### toString

android

```
open fun toString(): String
```

## Public properties

### category

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

```
val category: Insight.Category
```

Category of the Insight, representing the type of problem.

Every similar insight must identify equal `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/Insight.Category`s to enable macrobenchmark to group them across iterations.

### observedLabel

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

```
val observedLabel: String
```

suffix after the deeplink to convey problem severity, e.g. "(100000000ns)"

### traceLink

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

```
val traceLink: PerfettoTrace.Link
```

Link to content within a trace to highlight for the given problem.

Insights should specify `https://developer.android.com/reference/kotlin/androidx/benchmark/traceprocessor/PerfettoTrace.Link#urlParamsEncoded()` to pass context to [ui.perfetto.dev](https://ui.perfetto.dev).