Skip to main content

ec_adaptive_throttle_is_exceeded

Last updated March 2020

Name

ec_adaptive_throttle_is_exceeded — check to see if a throttle is over budget

Synopsis

#include "modules/generic/adaptive.h"

| int **ec_adaptive_throttle_is_exceeded** ( | name, |   | |   | is_shared, |   | |   | now, |   | |   | later, |   | |   | delta); |   |

const char * <var class="pdparam">name</var>; int <var class="pdparam">is_shared</var>; struct timeval * <var class="pdparam">now</var>; struct timeval * <var class="pdparam">later</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 if a throttle is over budget

Given the current "now" time value, updates the "later" value to the duration after which the throttle would be under budget.

Parameters

name

the name of the throttle

indicate

if the throttle is shared or not

now

the current time

later

the when the throttle will be under budget

add

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

Return Values

1 is over budget, 0 if under budget, -1 on error.

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

Was this page helpful?