/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { type TypedEventEmitter } from "@fluid-internal/client-utils"; import type { IDeltaManagerFull } from "@fluidframework/container-definitions/internal"; import type { IContainerRuntimeBaseEvents } from "@fluidframework/runtime-definitions/internal"; import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal"; /** * DeltaScheduler is responsible for the scheduling of inbound delta queue in cases where there * is more than one op a particular run of the queue. It does not schedule if there is just one * op or just one batch in the run. It does the following two things: * * 1. If the ops have been processed for more than a specific amount of time, it pauses the queue * and calls setTimeout to schedule a resume of the queue. This ensures that we don't block * the JS thread for a long time processing ops synchronously (for example, when catching up * ops right after boot or catching up ops / delayed realizing data stores by summarizer). * * 2. If we scheduled a particular run of the queue, it logs telemetry for the number of ops * processed, the time and number of turns it took to process the ops. */ export declare class DeltaScheduler { private readonly deltaManager; private readonly runtimeEventsEmitter; private readonly logger; static readonly processingTime = 50; private readonly processingTimeIncrement; private processingStartTime; private currentAllowedProcessingTimeForTurn; private schedulingCount; private schedulingLog; constructor(deltaManager: IDeltaManagerFull, runtimeEventsEmitter: TypedEventEmitter, logger: ITelemetryLoggerExt); dispose(): void; private readonly batchBegin; private readonly batchEnd; private readonly inboundQueueIdle; /** * This function tells whether we should run the scheduler. */ private shouldRunScheduler; } //# sourceMappingURL=deltaScheduler.d.ts.map