MCPcopy
hub / github.com/YelpArchive/elastalert / duration

Method duration

elastalert/ruletypes.py:329–333  ·  view source on GitHub ↗

Get the size in timedelta of the window.

(self)

Source from the content-addressed store, hash-verified

327 self.onRemoved and self.onRemoved(oldest)
328
329 def duration(self):
330 """ Get the size in timedelta of the window. """
331 if not self.data:
332 return datetime.timedelta(0)
333 return self.get_ts(self.data[-1]) - self.get_ts(self.data[0])
334
335 def count(self):
336 """ Count the number of events in the window. """

Callers 1

appendMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected