Execution

Developer-only execution and benchmarking helpers used for profiling and optimization work.

Benchmark helpers for the compiled single-column runtime.

class pygotm.execution.benchmark.BenchmarkResult(case_name, status, error, compiled_function, nopython_signature_count, n_steps, n_output, timings)[source]

Bases: object

Benchmark result for one compiled single-column case.

Parameters:
case_name: str
status: Literal['PASS', 'ERROR', 'UNSUPPORTED']
error: str | None
compiled_function: str
nopython_signature_count: int
n_steps: int
n_output: int
timings: BenchmarkTimings
class pygotm.execution.benchmark.BenchmarkTimings(warmup_s, initialization_s, runtime_build_s, force_build_s, integration_s, compiled_integration_s, fabm_chunk_s, copy_back_s, output_conversion_s, total_s, steps_per_s, fabm_steps_per_s)[source]

Bases: object

Measured wall-clock timings for one benchmarked case.

Parameters:
warmup_s: float
initialization_s: float
runtime_build_s: float
force_build_s: float
integration_s: float
compiled_integration_s: float
fabm_chunk_s: float
copy_back_s: float
output_conversion_s: float
total_s: float
steps_per_s: float
fabm_steps_per_s: float
pygotm.execution.benchmark.benchmark_cases(case_names, *, max_steps=None, output=True, warmup=True)[source]

Benchmark cases sequentially, warming up only before the first case.

Return type:

tuple[BenchmarkResult, ...]

Parameters:
pygotm.execution.benchmark.benchmark_compiled_case(case_name, *, max_steps=None, output=True, warmup=True)[source]

Run one case through the compiled runtime and record benchmark timings.

Return type:

BenchmarkResult

Parameters:
pygotm.execution.benchmark.save_benchmark_results(results, path)[source]

Write benchmark results to one aggregate JSON artifact.

Return type:

None

Parameters: