Files
chat/venv/lib/python3.12/site-packages/kafka/metrics/stats/total.py
Andrew K. Choi ddce9f5125
All checks were successful
continuous-integration/drone/push Build is passing
Major fixes and new features
2025-09-25 15:51:48 +09:00

16 lines
418 B
Python

from __future__ import absolute_import
from kafka.metrics.measurable_stat import AbstractMeasurableStat
class Total(AbstractMeasurableStat):
"""An un-windowed cumulative total maintained over all time."""
def __init__(self, value=0.0):
self._total = value
def record(self, config, value, now):
self._total += value
def measure(self, config, now):
return float(self._total)