Skip to main content

ec_adaptive_throttle_time_until_clear

Last updated March 2020

Name

ec_adaptive_throttle_time_until_clear — check to see how long it will be until a throttle is under budget

Synopsis

#include "modules/generic/adaptive.h"

| int **ec_adaptive_throttle_time_until_clear** ( | name, |   | |   | is_shared, |   | |   | delta); |   |

const char * <var class="pdparam">name</var>; int <var class="pdparam">is_shared</var>; int <var class="pdparam">delta</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

check to see how long it will be until a throttle is under budget

A simpler to use variant of ec_throttle_is_exceeded, this function will return the number of seconds until the throttle will be under budget, or 0 if it is currently under budget.

when is_shared is true, the replication of counts lags behind. So, if you call this function right after ec_adaptive_throttle_delta, you won't see the effect of the amount just added. In that case, set delta = 1

Parameters

name

the name of the throttle

indicate

if the throttle is shared or not

add

to the current capacity by delta amount when determine if the quota has exceeded or not.

Return Values

the number of seconds until the throttle is under budget

**Configuration Change. ** This feature is available starting from Momentum 3.3.

Was this page helpful?