B >@Sa@s0ddlmZeddddgZGdddeZdS) ) 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_constantbetars/private/var/folders/fg/1jzmct0d7d72tjkvm_1nhqc5sw67yj/T/pip-unpacked-wheel-ef76ia09/botocore/retries/throttling.py__init__ s  zCubicCalculator.__init__cCs|jd|j|jd}|S)NgUUUUUU?)rr r )rrrrrr 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_receiveds 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) collectionsrrobjectrrrrrs