trinity.perf.stage_perf module#

class trinity.perf.stage_perf.ExplorerPerfOptions(config_path: 'str', output_path: 'str', monitor_interval: 'float' = 2.0, total_steps: 'int' = 5, timeout: 'Optional[float]' = None)[source]#

Bases: object

config_path: str#
output_path: str#
monitor_interval: float#
total_steps: int#
timeout: float | None#
__init__(config_path: str, output_path: str, monitor_interval: float = 2.0, total_steps: int = 5, timeout: float | None = None) None#
trinity.perf.stage_perf.validate_explorer_perf_config(config: Config) None[source]#

Validate perf-specific config constraints.

trinity.perf.stage_perf.build_explorer_perf_payload(*, config: Config | None, options: ExplorerPerfOptions, startup_time_sec: float | None, execution_time_sec: float | None, total_time_sec: float | None, resource_payload: dict[str, Any], step_metrics: list[dict[str, Any]], success: bool, error: str | None) dict[str, Any][source]#

Assemble the final JSON payload.

trinity.perf.stage_perf.write_explorer_perf_output(output_path: str, payload: dict[str, Any]) None[source]#

Write the final payload to disk.

trinity.perf.stage_perf.run_explorer_perf(options: ExplorerPerfOptions) dict[str, Any][source]#

Run Explorer perf collection and return the result payload.