bundle.perf_report.extractor.tracy

Tracy CSV profiling data extraction.

Classes

ProfileRecord

A single zone entry from a Tracy CSV export (tracy-csvexport).

ProfileData

All zone records extracted from one Tracy CSV file.

ProfileExtractor

Extract profiling data from Tracy CSV files produced by tracy-csvexport.

Module Contents

class bundle.perf_report.extractor.tracy.ProfileRecord[source]

A single zone entry from a Tracy CSV export (tracy-csvexport).

name: str
src_file: str
src_line: int
total_ns: int
total_perc: float
counts: int
mean_ns: int
min_ns: int
max_ns: int
std_ns: float
class bundle.perf_report.extractor.tracy.ProfileData[source]

All zone records extracted from one Tracy CSV file.

csv_path: pathlib.Path
records: list[ProfileRecord] = []
property name: str
property total_calls: int
class bundle.perf_report.extractor.tracy.ProfileExtractor[source]

Extract profiling data from Tracy CSV files produced by tracy-csvexport.

static extract(csv_path: pathlib.Path) ProfileData[source]

Parse a single Tracy CSV file and return structured data.

static extract_from_tracy(tracy_path: pathlib.Path) ProfileData[source]

Run tracy-csvexport on a .tracy file, save a sibling .csv, and return ProfileData.

Requires tracy-csvexport to be on PATH (built via: bundle tracy build csvexport). The CSV is saved alongside the .tracy file so it can be reused without re-exporting.

static extract_all(path: pathlib.Path) list[ProfileData][source]

Extract from a .tracy file, a single CSV file, or all CSV files in a directory.