Skip to content

Exceptions

benchmatrix.exceptions

Errors raised by the benchmatrix pytest-benchmark integration layer.

BenchmatrixError

Bases: Exception

Base class for benchmatrix matrix, metadata, and result errors.

Source code in src/benchmatrix/exceptions.py
4
5
class BenchmatrixError(Exception):
    """Base class for benchmatrix matrix, metadata, and result errors."""

MetadataSerializationError

Bases: BenchmatrixError, ValueError

Raised when benchmark metadata cannot be represented as strict JSON.

Source code in src/benchmatrix/exceptions.py
8
9
class MetadataSerializationError(BenchmatrixError, ValueError):
    """Raised when benchmark metadata cannot be represented as strict JSON."""

BenchmarkJsonError

Bases: BenchmatrixError, ValueError

Raised when pytest-benchmark JSON cannot be parsed as benchmatrix output.

Source code in src/benchmatrix/exceptions.py
12
13
class BenchmarkJsonError(BenchmatrixError, ValueError):
    """Raised when pytest-benchmark JSON cannot be parsed as benchmatrix output."""

BenchmarkCollectionError

Bases: BenchmatrixError, RuntimeError

Raised when a repeated-run collection cannot be created.

Source code in src/benchmatrix/exceptions.py
16
17
class BenchmarkCollectionError(BenchmatrixError, RuntimeError):
    """Raised when a repeated-run collection cannot be created."""

BenchmarkPolicyError

Bases: BenchmatrixError, ValueError

Raised when benchmark policy configuration is invalid.

Source code in src/benchmatrix/exceptions.py
20
21
class BenchmarkPolicyError(BenchmatrixError, ValueError):
    """Raised when benchmark policy configuration is invalid."""