# Insight.Category

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

*** ** * ** ***

<br />

```
@ExperimentalInsightApi
public final class Insight.Category
```

<br />

*** ** * ** ***

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.

Every Insight that shares the same conceptual category must share an equal `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category` so that macrobenchmark can group them when summarizing observed patterns across multiple iterations.

In Studio versions supporting web links, will produce an output like the following:

```
[JIT compiled methods](https://d.android.com/test#JIT_COMPILED_METHODS) (expected: < 65 count)
```

In the above example:

- `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#title()` is `"JIT compiled methods"`

- `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#titleUrl()` is `"https://d.android.com/test#JIT_COMPILED_METHODS"`

- `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#postTitleLabel()` is " (expected: \< 65 count)"

In Studio versions not supporting web links, `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#titleUrl()` is ignored.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#Category(kotlin.String,kotlin.String,kotlin.String)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html title, https://developer.android.com/reference/java/lang/String.html titleUrl, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html postTitleLabel )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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/traceprocessor/Insight.Category#getPostTitleLabel()()` Suffix after the title, generally specifying expected values. |
| `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/traceprocessor/Insight.Category#getTitle()()` Title of the Insight category, for example "JIT compiled methods" |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#getTitleUrl()()` Optional web URL to explain the category of problem. |
| `int` | `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#toString()()` |

## Public constructors

### Category

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

```
public Category(
    @NonNull String title,
    String titleUrl,
    @NonNull String postTitleLabel
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getPostTitleLabel

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

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

Suffix after the title, generally specifying expected values.

For example, " (expected: \< 65 count)"

### getTitle

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

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

Title of the Insight category, for example "JIT compiled methods"

### getTitleUrl

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

```
public final String getTitleUrl()
```

Optional web URL to explain the category of problem.

If non-null, generally `https://developer.android.com/reference/androidx/benchmark/traceprocessor/Insight.Category#(kotlin.String,kotlin.String,kotlin.String)` should be linked to this URL.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```