cs_survival_kit.bench.cli ¶
Command-line runner: python -m cs_survival_kit.bench.
BenchmarkError ¶
Bases: Exception
A benchmark file could not be found or loaded.
- Reference (cs-survival-kit 0.6.0) cs_survival_kit bench cli
discover ¶
Find the benchmark files that the given paths refer to.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths
|
Sequence[Path]
|
Files, which are used as given, and directories, which
contribute their |
required |
Returns:
| Type | Description |
|---|---|
list[Path]
|
The benchmark files, in the order given and sorted within a directory. |
Raises:
| Type | Description |
|---|---|
BenchmarkError
|
If a path does not exist, or nothing was found. |
Source code in lib/cs_survival_kit/bench/cli.py
load_benchmarks ¶
Import a benchmark file and return its BENCHMARKS list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
A Python file that defines |
required |
Returns:
| Type | Description |
|---|---|
list[Benchmark]
|
The benchmarks the file defines. |
Raises:
| Type | Description |
|---|---|
BenchmarkError
|
If the file cannot be imported, or does not define
|
Source code in lib/cs_survival_kit/bench/cli.py
main ¶
Run benchmark files and store their results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
argv
|
Sequence[str] | None
|
Command-line arguments. Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
int
|
The process exit code: 0 on success, 2 if a benchmark file could not |
int
|
be found or loaded. |