We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ea51d9 commit 71bb1d0Copy full SHA for 71bb1d0
1 file changed
src/ohip_bench/models.py
@@ -24,6 +24,10 @@
24
from typing import Any, Optional
25
26
27
+def _round_ms(value: float) -> float:
28
+ return round(float(value), 6)
29
+
30
31
class BenchmarkDomain(str, Enum):
32
CONSENT = "CONSENT"
33
SAFETY = "SAFETY"
@@ -155,7 +159,7 @@ class BenchmarkResult:
155
159
156
160
@property
157
161
def duration_ms(self) -> float:
158
- return max(0.0, (float(self.finished_at_utc_s) - float(self.started_at_utc_s)) * 1000.0)
162
+ return max(0.0, _round_ms((float(self.finished_at_utc_s) - float(self.started_at_utc_s)) * 1000.0))
163
164
def to_dict(self) -> dict[str, Any]:
165
return {
0 commit comments