This commit is contained in:
cjw
2026-02-12 23:22:11 +08:00
parent 7b09eb3d89
commit 89660bba4e
5988 changed files with 2517516 additions and 0 deletions
@@ -0,0 +1,24 @@
from __future__ import absolute_import
import abc
from kafka.vendor.six import add_metaclass
@add_metaclass(abc.ABCMeta)
class AbstractStat(object):
"""
An AbstractStat is a quantity such as average, max, etc that is computed
off the stream of updates to a sensor
"""
@abc.abstractmethod
def record(self, config, value, time_ms):
"""
Record the given value
Arguments:
config (MetricConfig): The configuration to use for this metric
value (float): The value to record
timeMs (int): The POSIX time in milliseconds this value occurred
"""
raise NotImplementedError