pygx.instrument¶
PyGX's instrumentation sub-packages.
instrument
¶
PyGX's instrumentation sub-packages.
Three private modules back the public namespaces re-exported here:
_loggingis exposed aspg.logging/pygx.instrument.logging— use those names to set/read the project logger._monitoringis exposed aspg.monitoring/pygx.instrument.monitoringfor metric collection._timingis flattened into this package:pg.instrument.TimeItandpg.instrument.timeitare the public surface.
TimeIt
¶
Context manager for timing the execution of a code block.
Source code in pygx/instrument/_timing.py
Status
dataclass
¶
Status(
name: str,
elapse: float = 0.0,
has_ended: bool = True,
error: ErrorInfo | None = None,
)
Bases: WireConvertible
Status of a single pg.timeit.
merge
¶
Merges the status of two pg.timeit.
Source code in pygx/instrument/_timing.py
StatusSummary
dataclass
¶
StatusSummary(breakdown: dict[str, Entry] = dict())
Bases: WireConvertible
Aggregated summary for repeated calls for pg.timeit.
Entry
dataclass
¶
start
¶
end
¶
Ends timing.
Source code in pygx/instrument/_timing.py
status
¶
status() -> dict[str, Status]
Gets the status of all timeit under this context.
Source code in pygx/instrument/_timing.py
options: show_root_heading: false show_root_toc_entry: false members_order: source heading_level: 2