m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
628 B

7 months ago
  1. from __future__ import absolute_import
  2. import abc
  3. class AbstractStat(object):
  4. """
  5. An AbstractStat is a quantity such as average, max, etc that is computed
  6. off the stream of updates to a sensor
  7. """
  8. __metaclass__ = abc.ABCMeta
  9. @abc.abstractmethod
  10. def record(self, config, value, time_ms):
  11. """
  12. Record the given value
  13. Arguments:
  14. config (MetricConfig): The configuration to use for this metric
  15. value (float): The value to record
  16. timeMs (int): The POSIX time in milliseconds this value occurred
  17. """
  18. raise NotImplementedError