Skip to content

BackendCapabilities

Inspect result.capabilities before interpreting measurements. Unsupported metrics remain None; sampling observations are separate from exact hits.

dataclass linescope.model.BackendCapabilities[source]

Describe measurements a collector can actually provide.

sample_counts identifies collectors that count observed project thread frames, independently of support for execution hit_counts.

Attributes

line_time : bool

Whether the collector provides measurements for individual lines.

function_time : bool

Whether visible line costs can be indexed by function.

hit_counts : bool

Whether exact line executions and function calls are available.

memory : bool

Whether Python driver memory measurements are available.

scoped : bool

Whether collection can be restricted to a profiling scope.

attach : bool

Whether the collector can attach to an existing process.

notebook : bool

Whether captured notebook source can receive measurements.

spark_driver : bool

Whether driver lines can be correlated with Spark actions.

spark_executors : bool

Whether executor-side Python measurements are supported.

sampled : bool

Whether times are sampling estimates rather than traced intervals.

gpu : bool

Whether GPU utilization and device memory are available.

sample_counts : bool

Whether per-line sampling observations are available independently of hits.


See Also

LineStats

Aggregate a visible source line without inventing unsupported hit counts.

ProfileResult

Combine portable source snapshots with backend-independent run data.

SourceUnit

Preserve the full source text observed during collection.