Skip to content

LineStats

Inspect result.root_run.lines for measurements and navigation links attached to individual source lines. Unavailable measurements remain None.

dataclass linescope.model.LineStats[source]

Aggregate a visible source line without inventing unsupported hit counts.

samples counts observed project thread frames, separately from line execution hits. None means that sample counts are unavailable.

Attributes

location : SourceLocation

Snapshot location of the measured or referenced source line.

wall_time_ns : int | None

Measured driver wall time in nanoseconds, or None if unavailable.

hits : int | None

Exact execution count, or None for unsupported or sampled counts.

memory : MemoryStats | None

Allocation measurements, separate from process RAM, or None when unavailable.

calls : list[SymbolRef]

Individually resolved symbol links on this source line.

spark_executions : list[str]

Identifiers of Spark actions correlated with this line.

notebook_runs : list[str]

Identifiers of child notebook invocations linked from this line.

gpu : GPUStats | None

GPU measurements kept separate from driver wall time.

samples : int | None

Collected sampling observations, or None when unsupported; never exact hits.

ram : ProcessMemoryStats | None

Observed process RAM during this line, separate from allocation deltas.


See Also

FunctionStats

Index function costs derived from visible line measurements.

MemoryStats

Describe allocation measurements in bytes, separate from process RAM.

SourceLocation

Locate a one-based line and zero-based character column in a snapshot.