
                         :    S SK Jr  \" S/ SQ5      r " S S5      rg)    )
namedtupleCubicParamsw_maxk	last_failc                   B    \ rS rSrSrSr\\4S jrS rS rS r	S r
S	rg
)CubicCalculator   g?gffffff?c                 ^    Xl         X0l        X@l        U R                  5       U l        X l        g N)_w_max_scale_constant_beta_calculate_zero_point_k
_last_fail)selfstarting_max_rate
start_timescale_constantbetas        .lib/third_party/botocore/retries/throttling.py__init__CubicCalculator.__init__
   s)     (-
,,.$    c                 b    U R                   SU R                  -
  -  U R                  -  nUS-  nU$ )N   gUUUUUU?)r   r   r   )r   scaled_valuer   s      r   r   %CubicCalculator._calculate_zero_point   s2    q4::~6$:N:NNW%r   c                 x    XR                   -
  nU R                  X R                  -
  S-  -  U R                  -   nU$ )N   )r   r   r   r   )r   	timestampdtnew_rates       r   success_received CubicCalculator.success_received   s7    (''2<A*==Kr   c                 `    Xl         U R                  5       U l        X l        XR                  -  $ r   )r   r   r   r   r   )r   current_rater#   s      r   error_receivedCubicCalculator.error_received!   s+    
 #,,.#jj((r   c                 T    [        U R                  U R                  U R                  S9$ )a0  Return 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.

r   )r   r   r   r   )r   s    r   get_params_snapshot#CubicCalculator.get_params_snapshot+   s$     ++DOO
 	
r   )r   r   r   r   r   N)__name__
__module____qualname____firstlineno___SCALE_CONSTANT_BETAr   r   r&   r*   r-   __static_attributes__ r   r   r
   r
      s-    OE '%

)
r   r
   N)collectionsr   r   r
   r6   r   r   <module>r8      s    "(CD1
 1
r   