k4bench.results.reporter¶
k4bench.results.reporter ¶
Format and persist benchmark results.
Two responsibilities:
* :func:save_csv — write results to a CSV file
* :func:print_summary — print a formatted table to stdout
print_summary ¶
print_summary(results: list[RunResult]) -> None
Print a formatted summary table to stdout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
list[RunResult]
|
Results in the order they should appear in the table. |
required |
Source code in k4bench/results/reporter.py
save_csv ¶
save_csv(results: list[RunResult], log_dir: Path) -> None
Write one {label}_results.csv per result into log_dir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
list[RunResult]
|
Results to serialise; must be non-empty. |
required |
log_dir
|
Path
|
Directory to write into. Created if absent. |
required |