B 䊇c@s.ddlmZeddddgZGdddZdS) ) namedtuple CubicParamsw_maxk last_failc@sBeZdZdZdZeefddZddZddZd d Zd d Z d S)CubicCalculatorg?gffffff?cCs&||_||_||_||_||_dS)N)_w_max_scale_constant_beta_calculate_zero_point_k _last_fail)selfZstarting_max_rate start_timeZscale_constantbetarv/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/botocore/retries/throttling.py__init__ s  zCubicCalculator.__init__cCs"|jd|j|j}|d}|S)NgUUUUUU?)rr r )rZ scaled_valuerrrrr sz%CubicCalculator._calculate_zero_pointcCs(||j}|j||jd|j}|S)N)r r r r)r timestampdtZnew_raterrrsuccess_receiveds z CubicCalculator.success_receivedcCs ||_||_||_||jS)N)rr r r r )rZ current_raterrrrerror_received!s zCubicCalculator.error_receivedcCst|j|j|jdS)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 )rrrrget_params_snapshot+s z#CubicCalculator.get_params_snapshotN) __name__ __module__ __qualname__Z_SCALE_CONSTANTZ_BETArr rrrrrrrrs  rN) collectionsrrrrrrrs