MCPcopy Create free account
hub / github.com/Open-Quant/openquant / BenchStats

Class BenchStats

python/benchmarks/benchmark_data_processing.py:18–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17@dataclass(frozen=True)
18class BenchStats:
19 name: str
20 rows: int
21 bytes_estimate: int
22 iterations: int
23 mean_ms: float
24 p50_ms: float
25 p95_ms: float
26 std_ms: float
27 rows_per_sec: float
28 mb_per_sec: float
29
30 def as_dict(self) -> dict[str, Any]:
31 return {
32 "name": self.name,
33 "rows": self.rows,
34 "bytes_estimate": self.bytes_estimate,
35 "iterations": self.iterations,
36 "mean_ms": self.mean_ms,
37 "p50_ms": self.p50_ms,
38 "p95_ms": self.p95_ms,
39 "std_ms": self.std_ms,
40 "rows_per_sec": self.rows_per_sec,
41 "mb_per_sec": self.mb_per_sec,
42 }
43
44
45def _estimate_df_bytes(df: pl.DataFrame) -> int:

Callers 2

_measureFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected