AdaptiveConcurrency
Defined in: packages/core/src/utils/adaptive-concurrency.ts:43
AIMD controller over the number of pages rendering at once.
Captures are grouped in windows (at least 8, or two per slot). A window with any timeout halves the limit and holds it there for a few windows; a window whose p95 latency grew more than the tolerance over the first window, or whose event-loop lag p99 is high, lowers it by one; a healthy window raises it by one. The first window without timeouts sets the latency baseline, so it only ever holds.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AdaptiveConcurrency(
options):AdaptiveConcurrency
Defined in: packages/core/src/utils/adaptive-concurrency.ts:53
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”AdaptiveConcurrency
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get limit():
number
Defined in: packages/core/src/utils/adaptive-concurrency.ts:62
Pages allowed in flight right now.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Defined in: packages/core/src/utils/adaptive-concurrency.ts:75
Release the lag monitor.
Returns
Section titled “Returns”void
observe()
Section titled “observe()”observe(
observation):void
Defined in: packages/core/src/utils/adaptive-concurrency.ts:67
Record a finished capture; may change limit at a window boundary.
Parameters
Section titled “Parameters”observation
Section titled “observation”Returns
Section titled “Returns”void