TraceSectionMetric


@ExperimentalMetricApi
class TraceSectionMetric : Metric


Captures the time taken by named trace section - a named begin / end pair matching the provided sectionName.

Select how matching sections are resolved into a duration metric with mode, and configure if sections outside the target process are included with targetPackageOnly.

The following TraceSectionMetric counts the number of JIT method compilations that occur within a trace:

TraceSectionMetric(
sectionName = "JIT Compiling %",
mode = TraceSectionMetric.Mode.Sum
)

Summary

Nested types

Average duration of trace sections matching sectionName in the trace.

Counts the number of observed instances of a trace section matching sectionName in the trace.

Captures the duration of the first instance of sectionName in the trace.

Reports the maximum observed duration for a trace section matching sectionName in the trace.

Reports the maximum observed duration for a trace section matching sectionName in the trace.

Captures the sum of all instances of sectionName in the trace.

Public constructors

TraceSectionMetric(
    sectionName: String,
    mode: TraceSectionMetric.Mode,
    label: String,
    targetPackageOnly: Boolean
)

Public constructors

TraceSectionMetric

Added in 1.3.0-alpha03
TraceSectionMetric(
    sectionName: String,
    mode: TraceSectionMetric.Mode = Mode.Sum,
    label: String = sectionName,
    targetPackageOnly: Boolean = true
)