MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / tick

Method tick

bbot/scanner/stats.py:24–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.window = window
23
24 def tick(self):
25 current_time = time.time()
26 self.timestamps.append(current_time)
27 self.remove_old_timestamps(current_time)
28
29 def remove_old_timestamps(self, current_time):
30 while self.timestamps and current_time - self.timestamps[0] > self.window:

Callers 3

test_speed_counterFunction · 0.95
transformFunction · 0.80
event_consumedMethod · 0.80

Calls 1

remove_old_timestampsMethod · 0.95

Tested by 1

test_speed_counterFunction · 0.76