bundle.perf_report.storage

Submodules

Classes

CProfileStorage

Store and retrieve cProfile data in HDF5, keyed by version and platform.

ProfileStorage

Store and retrieve Tracy zone data in HDF5, keyed by version and platform.

Package Contents

class bundle.perf_report.storage.CProfileStorage(h5_path: pathlib.Path | str)

Store and retrieve cProfile 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/<prof_name>  (structured dataset)
h5_path
save(profiles: list[bundle.perf_report.extractor.CProfileData], machine_id: str, bundle_version: str, platform_id: str, platform_meta: dict | None = None)

Write profiles under /<version>/<platform_id>/, appending to existing file.

list_versions() list[str]
list_platforms(version: str) list[str]
load_meta(version: str, platform_id: str) dict
load_profiles(version: str, platform_id: str) list[bundle.perf_report.extractor.CProfileData]

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) CProfileStorage

Extract all .prof files from a directory and save to HDF5.

class bundle.perf_report.storage.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.

list_versions() list[str]
list_platforms(version: str) list[str]
load_meta(version: str, platform_id: str) dict
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.