kaira.benchmarks.BenchmarkResult

Inheritance diagram of BenchmarkResult

Inheritance diagram for BenchmarkResult

class kaira.benchmarks.BenchmarkResult(benchmark_id: str, name: str, description: str, metrics: ~typing.Dict[str, ~typing.Any], execution_time: float, timestamp: str, metadata: ~typing.Dict[str, ~typing.Any] = <factory>)[source]

Bases: object

Container for benchmark results.

Methods

__init__

save

Save result to JSON file.

to_dict

Convert result to dictionary.

to_json

Convert result to JSON string.

Attributes

benchmark_id

name

description

metrics

execution_time

timestamp

metadata

benchmark_id: str
name: str
description: str
metrics: Dict[str, Any]
execution_time: float
timestamp: str
metadata: Dict[str, Any]
to_dict() Dict[str, Any][source]

Convert result to dictionary.

to_json() str[source]

Convert result to JSON string.

save(filepath: str | Path) None[source]

Save result to JSON file.

__init__(benchmark_id: str, name: str, description: str, metrics: ~typing.Dict[str, ~typing.Any], execution_time: float, timestamp: str, metadata: ~typing.Dict[str, ~typing.Any] = <factory>) None