@ExperimentalInsightApi
public final class Insight


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

Benchmark output will summarize multiple insights, for example:

[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

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.

Public constructors

Insight(
    @NonNull Insight.Category category,
    @NonNull String observedLabel,
    @NonNull PerfettoTrace.Link traceLink
)

Public methods

boolean
equals(Object other)
final @NonNull Insight.Category

Category of the Insight, representing the type of problem.

final @NonNull String

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

final @NonNull PerfettoTrace.Link

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

int
@NonNull String

Public constructors

Insight

Added in 1.4.0-alpha08
public Insight(
    @NonNull Insight.Category category,
    @NonNull String observedLabel,
    @NonNull PerfettoTrace.Link traceLink
)

Public methods

equals

public boolean equals(Object other)

getCategory

Added in 1.4.0-alpha08
public final @NonNull Insight.Category getCategory()

Category of the Insight, representing the type of problem.

Every similar insight must identify equal Categorys to enable macrobenchmark to group them across iterations.

getObservedLabel

Added in 1.4.0-alpha08
public final @NonNull String getObservedLabel()

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

getTraceLink

Added in 1.4.0-alpha08
public final @NonNull PerfettoTrace.Link getTraceLink()

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

Insights should specify PerfettoTrace.Link.urlParamsEncoded to pass context to ui.perfetto.dev.

hashCode

public int hashCode()

toString

public @NonNull String toString()