RecompositionTracer.TraceCollector


Records recomposition flow events.

Summary

Public functions

Unit
beginSection(sectionName: String, flowIds: List<Long>)

Begins a named trace section.

android
Unit

Ends the current trace section.

android
Unit
instantEvent(
    sectionName: String,
    stackTrace: List<StackTraceElement>,
    id: Int,
    flowIds: List<Long>
)

Records an instant trace event.

android
Boolean

Returns true if trace collector is currently active and accepting events.

android

Public functions

beginSection

fun beginSection(sectionName: String, flowIds: List<Long>): Unit

Begins a named trace section.

Parameters
sectionName: String

name of the trace section

flowIds: List<Long>

ids for the invalidation chain connecting events.

endSection

fun endSection(): Unit

Ends the current trace section.

instantEvent

fun instantEvent(
    sectionName: String,
    stackTrace: List<StackTraceElement>,
    id: Int,
    flowIds: List<Long>
): Unit

Records an instant trace event.

Parameters
sectionName: String

name of the trace event

stackTrace: List<StackTraceElement>

call stack associated with the event

id: Int

unique identifier of the instance associated with events

flowIds: List<Long>

ids for the invalidation chain connecting events.s

isEnabled

fun isEnabled(): Boolean

Returns true if trace collector is currently active and accepting events.