* automatic throttle burst size, #24699 * throttleEven used maxBurst=Int.MaxValue, which in practise resulted in no throttling at all at high rates * The original problem that throttleEven tried to solve was that when the throttle rate (cost / per) was high the cost of scheduling dominated and became much lower than the given rate, if 0 or low maxBurst was given. Difficult for user to know what maxBurst to use. * In fact, that was already the case for rates > 30/s. * This is fixed by automatically adjusting the maxBurst for higher throttle rates in a new throttle overload that doesn't include maxBurst parameter * Also skipped the mode parameter for that variant since Shaping is what almost always is what you want, and otherwise you can use the full signature with a good maxBurst * Deprecated throttleEven, since it is the same. Also fixed the implementation of throttleEven to use the automatic burst size, since Int.MaxValue is not useful at all. |
||
|---|---|---|
| .. | ||
| src | ||