Skip to content

Benchmark Registry

Benchmark registry for managing benchmark registration and lookup.

BenchmarkRegistry

Registry for managing benchmark pipeline classes.

get_benchmark_class classmethod

get_benchmark_class(
    identifier: str,
) -> Type[BenchmarkPipeline]

Get a registered benchmark pipeline class by identifier.

get_benchmark_instance classmethod

get_benchmark_instance(
    identifier: str, context: RunContext
) -> BenchmarkPipeline

Instantiate a benchmark pipeline by identifier.

list_benchmarks classmethod

list_benchmarks(origin: Optional[str] = None) -> List[str]

List registered benchmarks, optionally filtered by origin.

register_benchmark classmethod

register_benchmark(
    pipeline_cls: Type[BenchmarkPipeline],
) -> Type[BenchmarkPipeline]

Decorator to register a BenchmarkPipeline subclass with the BenchmarkRegistry.

Example usage

@BenchmarkRegistry.register_benchmark class MyBenchmark(Benchmark): origin = "user" source = "my_lib" name = "my_benchmark"