20 lines
642 B
Python
20 lines
642 B
Python
"""Benchmark registry — maps benchmark names to their check loaders."""
|
|
from __future__ import annotations
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from ..benchmarks.base import BenchmarkInfo
|
|
|
|
# Lazy imports to avoid loading all benchmarks at startup
|
|
def get_benchmark(name: str) -> "BenchmarkInfo":
|
|
name = name.lower()
|
|
if name == "nginx":
|
|
from .nginx import benchmark
|
|
return benchmark
|
|
elif name == "debian":
|
|
from .debian import benchmark
|
|
return benchmark
|
|
else:
|
|
raise ValueError(f"Unknown benchmark '{name}'. Available: nginx, debian")
|
|
|
|
AVAILABLE = ["nginx", "debian"]
|