o
    `j                     @   s    d dl mZ G dd deZdS )    )AbstractSampledStatc                       s4   e Zd ZdZdZ fddZdd Zdd Z  ZS )	CountzS
    An AbstractSampledStat that maintains a simple count of what it has seen.
    )_initial_value_samples_currentc                    s   t  d d S )Ng        )super__init__)self	__class__ W/home/djax/ivt_ai_plugin/venv/lib/python3.10/site-packages/kafka/metrics/stats/count.pyr   
   s   zCount.__init__c                 C   s   | j d7  _ d S )Ng      ?value)r	   sampleconfigr   nowr   r   r   update   s   zCount.updatec                 C   s   t tdd |D S )Nc                 s   s    | ]}|j V  qd S )Nr   ).0r   r   r   r   	<genexpr>   s    z Count.combine.<locals>.<genexpr>)floatsum)r	   samplesr   r   r   r   r   combine   s   zCount.combine)	__name__
__module____qualname____doc__	__slots__r   r   r   __classcell__r   r   r
   r   r      s    r   N) kafka.metrics.stats.sampled_statr   r   r   r   r   r   <module>   s    