/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal"; import type { ISummaryConfigurationHeuristics, ISummarizeAttempt, ISummarizeHeuristicData, ISummarizeHeuristicRunner, ISummaryHeuristicStrategy } from "../summarizerTypes.js"; import type { SummarizeReason } from "../summarizerUtils.js"; /** * Simple implementation of class for tracking summarize heuristic data. */ export declare class SummarizeHeuristicData implements ISummarizeHeuristicData { lastOpSequenceNumber: number; protected _lastAttempt: ISummarizeAttempt; get lastAttempt(): ISummarizeAttempt; protected _lastSuccessfulSummary: Readonly; get lastSuccessfulSummary(): Readonly; get opsSinceLastSummary(): number; hasMissingOpData: boolean; totalOpsSize: number; /** * Cumulative size in bytes of all the ops at the beginning of the summarization attempt. * Is used to adjust totalOpsSize appropriately after successful summarization. */ private totalOpsSizeBefore; numNonRuntimeOps: number; /** * Number of non-runtime ops at beginning of attempting to summarize. * Is used to adjust numNonRuntimeOps appropriately after successful summarization. */ private numNonRuntimeOpsBefore; numRuntimeOps: number; /** * Number of runtime ops at beginning of attempting to summarize. * Is used to adjust numRuntimeOps appropriately after successful summarization. */ private numRuntimeOpsBefore; constructor(lastOpSequenceNumber: number, /** * Baseline attempt data used for comparisons with subsequent attempts/calculations. */ attemptBaseline: ISummarizeAttempt); updateWithLastSummaryAckInfo(lastSummary: Readonly): void; recordAttempt(refSequenceNumber?: number): void; markLastAttemptAsSuccessful(): void; } /** * This class contains the heuristics for when to summarize. */ export declare class SummarizeHeuristicRunner implements ISummarizeHeuristicRunner { private readonly heuristicData; private readonly configuration; private readonly logger; private readonly summarizeStrategies; private readonly idleTimer; private readonly runSummarize; constructor(heuristicData: ISummarizeHeuristicData, configuration: ISummaryConfigurationHeuristics, trySummarize: (reason: SummarizeReason) => void, logger: ITelemetryLoggerExt, summarizeStrategies?: ISummaryHeuristicStrategy[]); get idleTime(): number; get opsSinceLastAck(): number; start(): void; run(): void; shouldRunLastSummary(): boolean; dispose(): void; } //# sourceMappingURL=summarizerHeuristics.d.ts.map