MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / ProfilingItem

Class ProfilingItem

docling/utils/profiling.py:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class ProfilingItem(BaseModel):
21 scope: ProfilingScope
22 count: int = 0
23 times: List[float] = []
24 start_timestamps: List[datetime] = []
25
26 def avg(self) -> float:
27 return np.average(self.times) # type: ignore
28
29 def std(self) -> float:
30 return np.std(self.times) # type: ignore
31
32 def mean(self) -> float:
33 return np.mean(self.times) # type: ignore
34
35 def percentile(self, perc: float) -> float:
36 return np.percentile(self.times, perc) # type: ignore
37
38
39class TimeRecorder:

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected