(path: str | Path)
| 9 | |
| 10 | |
| 11 | def load_benchmarks(path: str | Path) -> list[BenchmarkItem]: |
| 12 | benchmark_path = Path(path) |
| 13 | items: list[BenchmarkItem] = [] |
| 14 | with benchmark_path.open("r", encoding="utf-8") as stream: |
| 15 | for line in stream: |
| 16 | line = line.strip() |
| 17 | if not line: |
| 18 | continue |
| 19 | items.append(BenchmarkItem.from_dict(json.loads(line))) |
| 20 | return items |
| 21 | |
| 22 | |
| 23 | def find_benchmark_by_name(path: str | Path, benchmark_name: str) -> BenchmarkItem: |
no test coverage detected