from _typeshed import Incomplete

from kafka.metrics.measurable_stat import AbstractMeasurableStat
from kafka.metrics.stats.sampled_stat import AbstractSampledStat

class TimeUnit:
    NANOSECONDS: Incomplete
    MICROSECONDS: Incomplete
    MILLISECONDS: Incomplete
    SECONDS: Incomplete
    MINUTES: Incomplete
    HOURS: Incomplete
    DAYS: Incomplete
    @staticmethod
    def get_name(time_unit): ...

class Rate(AbstractMeasurableStat):
    def __init__(self, time_unit=3, sampled_stat=None) -> None: ...
    def unit_name(self): ...
    def record(self, config, value, time_ms) -> None: ...
    def measure(self, config, now): ...
    def window_size(self, config, now): ...
    def convert(self, time_ms): ...

class SampledTotal(AbstractSampledStat):
    def __init__(self, initial_value=None) -> None: ...
    def update(self, sample, config, value, time_ms) -> None: ...
    def combine(self, samples, config, now): ...
