bundle.perf_report.extractor.cprofile

cProfile .prof file extraction.

Classes

CProfileRecord

A single function entry from a .prof file.

CProfileData

All records extracted from one .prof file.

CProfileExtractor

Extract profiling data from .prof files produced by cProfile.

Module Contents

class bundle.perf_report.extractor.cprofile.CProfileRecord[source]

A single function entry from a .prof file.

file: str
line_number: int
function: str
call_count: int
total_time: float
cumulative_time: float
class bundle.perf_report.extractor.cprofile.CProfileData[source]

All records extracted from one .prof file.

prof_path: pathlib.Path
records: list[CProfileRecord] = []
property name: str
property total_calls: int
class bundle.perf_report.extractor.cprofile.CProfileExtractor[source]

Extract profiling data from .prof files produced by cProfile.

static extract(prof_path: pathlib.Path) CProfileData[source]

Parse a single .prof file and return structured data.

static extract_all(directory: pathlib.Path) list[CProfileData][source]

Recursively find and extract all .prof files in a directory.