bundle.perf_report¶
Submodules¶
Classes¶
Extract profiling data from Tracy CSV files produced by tracy-csvexport. |
|
A single zone entry from a Tracy CSV export (tracy-csvexport). |
|
Store and retrieve Tracy zone data in HDF5, keyed by version and platform. |
Package Contents¶
- class bundle.perf_report.ProfileExtractor¶
Extract profiling data from Tracy CSV files produced by tracy-csvexport.
- static extract(csv_path: pathlib.Path) ProfileData¶
Parse a single Tracy CSV file and return structured data.
- static extract_from_tracy(tracy_path: pathlib.Path) ProfileData¶
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]¶
Extract from a .tracy file, a single CSV file, or all CSV files in a directory.
- class bundle.perf_report.ProfileRecord¶
A single zone entry from a Tracy CSV export (tracy-csvexport).
- class bundle.perf_report.ProfileStorage(h5_path: pathlib.Path | str)¶
Store and retrieve Tracy zone data in HDF5, keyed by version and platform.
HDF5 layout:
/<version>/<platform_id>/meta (attrs: machine_id, platform_id, bundle_version, timestamp) /<version>/<platform_id>/profiles/<name> (structured dataset)
- h5_path¶
- save(profiles: list[bundle.perf_report.extractor.ProfileData], machine_id: str, bundle_version: str, platform_id: str, platform_meta: dict | None = None)¶
Write profiles under /<version>/<platform_id>/, appending to existing file.
- load_profiles(version: str, platform_id: str) list[bundle.perf_report.extractor.ProfileData]¶
Load all profiles for a specific version+platform.
- classmethod from_directory(prof_dir: pathlib.Path, h5_path: pathlib.Path, machine_id: str, bundle_version: str, platform_id: str, platform_meta: dict | None = None) ProfileStorage¶
Extract all Tracy CSV files from a path and save to HDF5.