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 )	Maxz;An AbstractSampledStat that gives the max over its samples.)_initial_value_samples_currentc                    s   t  td d S )N-inf)super__init__float)self	__class__ Z/home/djax/ivt_ai_plugin/venv/lib/python3.10/site-packages/kafka/metrics/stats/max_stat.pyr	      s   zMax.__init__c                 C   s   t |j||_d S N)maxvalue)r   sampleconfigr   nowr   r   r   update   s   z
Max.updatec                 C   s"   |st dS t tdd |D S )Nr   c                 s   s    | ]}|j V  qd S r   )r   ).0r   r   r   r   	<genexpr>   s    zMax.combine.<locals>.<genexpr>)r
   r   )r   samplesr   r   r   r   r   combine   s   zMax.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    