MCPcopy Create free account
hub / github.com/DragonisCV/RAM / record

Method record

ram/utils/logger.py:23–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 self.start_time = self.tic = time.time()
22
23 def record(self):
24 self.count += 1
25 self.toc = time.time()
26 self.current_time = self.toc - self.tic
27 self.total_time += self.current_time
28 # calculate average time
29 self.avg_time = self.total_time / self.count
30
31 # reset
32 if self.count > self.window:
33 self.count = 0
34 self.total_time = 0
35
36 self.tic = time.time()
37
38 def get_current_time(self):
39 return self.current_time

Callers 1

train_pipelineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected