config
Benchmark configuration models.
Classes
class
BenchmarkConfig
(BaseModel)Main benchmark configuration.
Attributes
| Name | Type | Description |
|---|---|---|
| corpora_dir | Path | — |
| generate_csv | bool | — |
| generate_pdf | bool | — |
| latency_iterations | int | — |
| latency_runs | int | — |
| max_corpora | int | — |
| measure_fork | bool | — |
| measure_spawn | bool | — |
| memory_runs | int | — |
| num_queries | int | — |
| num_workers | int | — |
| output_dir | Path | — |
| progressive_runs | int | — |
| selected_corpora | list[str] | None | — |
| validation_corpus | str | — |
| warmup_runs | int | — |
Methods
to_dict(self) → dictConvert to JSON-serializable dictionary.
to_json(self) → strSerialize to JSON string.
class
CorpusConfig
(BaseModel)Configuration for a single corpus.
Attributes
| Name | Type | Description |
|---|---|---|
| name | str | — |
| path | Path | — |
| tf_path | Path | — |
Methods
to_dict(self) → dictConvert to JSON-serializable dictionary.
Functions
function
discover_corpora(corpora_dir: Path) → list[CorpusConfig]Discover all corpora in the benchmark directory.
Discover all corpora in the benchmark directory.
Args:
corpora_dir: Path to directory containing corpus subdirectories
Returns:
List of CorpusConfig objects for discovered corpora
Parameters
corpora_dir: Path
function
get_corpora_by_size(corpora: list[CorpusConfig]) → list[CorpusConfig]Sort corpora by size for progressive loading tests.
Sort corpora by size for progressive loading tests.
Args:
corpora: List of corpus configs
Returns:
Corpora sorted by size (smallest first)
Parameters
corpora: list[CorpusConfig]