simplebench.stats.operations_per_interval module🔗

Container for OperationsPerInterval benchmark statistics

class simplebench.stats.operations_per_interval.OperationsPerInterval(
*,
iterations: Sequence[Iteration] | None = None,
unit: str = 'Ops/s',
scale: float = 1.0,
rounds: int = 1,
data: Sequence[int | float] | None = None,
)[source]🔗

Bases: Stats

Container for the operations per time interval statistics of a benchmark.

Variables:
  • unit (str) – The unit of measurement for the benchmark (e.g., “ops/s”).

  • scale (float) – The scale factor for the interval (e.g. 1 for seconds).

  • rounds (int) – The number of data points in the benchmark.

  • data (Sequence[int | float]) – List of data points.

  • mean (float) – The mean operations per time interval.

  • median (float) – The median operations per time interval.

  • minimum (float) – The minimum operations per time interval.

  • maximum (float) – The maximum operations per time interval.

  • standard_deviation (float) – The standard deviation of operations per time interval.

  • relative_standard_deviation (float) – The relative standard deviation of ops per time interval.

  • percentiles (dict[int, float]) – Percentiles of operations per time interval.

class simplebench.stats.operations_per_interval.OperationsPerIntervalSummary(
*,
unit: str,
scale: float,
rounds: int,
mean: float,
median: float,
minimum: float,
maximum: float,
standard_deviation: float,
relative_standard_deviation: float,
percentiles: tuple[float, ...],
)[source]🔗

Bases: StatsSummary

Summary of OperationsPerInterval statistics.

Variables:
  • unit (str) – The unit of measurement for the benchmark (e.g., “ops/s”).

  • scale (float) – The scale factor for the interval (e.g. 1 for seconds).

  • rounds (int) – The number of data points in the benchmark.

  • mean (float) – The mean operations per time interval.

  • median (float) – The median operations per time interval.

  • minimum (float) – The minimum operations per time interval.

  • maximum (float) – The maximum operations per time interval.

  • standard_deviation (float) – The standard deviation of operations per time interval.

  • relative_standard_deviation (float) – The relative standard deviation of ops per time interval.

  • percentiles (dict[int, float]) – Percentiles of operations per time interval.