HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/self/root/lib/python3.6/site-packages/botocore/retries/__pycache__/throttling.cpython-36.pyc
3

�T_��@s0ddlmZeddddg�ZGdd�de�ZdS)	�)�
namedtuple�CubicParams�w_max�k�	last_failc@sBeZdZdZdZeefdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
S)�CubicCalculatorg�������?gffffff�?cCs&||_||_||_|j�|_||_dS)N)�_w_max�_scale_constant�_beta�_calculate_zero_point�_k�
_last_fail)�selfZstarting_max_rateZ
start_timeZscale_constantZbeta�r� /usr/lib/python3.6/throttling.py�__init__
s

zCubicCalculator.__init__cCs|jd|j|jd}|S)N�g@gUUUUUU�?)rr
r	)rrrrrrsz%CubicCalculator._calculate_zero_pointcCs(||j}|j||jd|j}|S)N�)r
r	rr)r�	timestampZdtZnew_raterrr�success_receiveds
z CubicCalculator.success_receivedcCs ||_|j�|_||_||jS)N)rrrr
r
)rZcurrent_raterrrr�error_receiveds
zCubicCalculator.error_receivedcCst|j|j|jd�S)aXReturn a read-only object of the current cubic parameters.

        These parameters are intended to be used for debug/troubleshooting
        purposes.  These object is a read-only snapshot and cannot be used
        to modify the behavior of the CUBIC calculations.

        New parameters may be added to this object in the future.

        )rrr)rrrr
)rrrr�get_params_snapshot(s
z#CubicCalculator.get_params_snapshotN)
�__name__�
__module__�__qualname__Z_SCALE_CONSTANTZ_BETArrrrrrrrrrs
rN)�collectionsrr�objectrrrrr�<module>s