@fluidframework/container-runtime 2.0.0-internal.1.4.2 → 2.0.0-internal.1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-runtime";
8
- export declare const pkgVersion = "2.0.0-internal.1.4.2";
8
+ export declare const pkgVersion = "2.0.0-internal.1.4.3";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-runtime";
8
- export const pkgVersion = "2.0.0-internal.1.4.2";
8
+ export const pkgVersion = "2.0.0-internal.1.4.3";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.1.4.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.1.4.3\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"summarizerHeuristics.d.ts","sourceRoot":"","sources":["../src/summarizerHeuristics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EACH,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,4EAA4E;AAC5E,qBAAa,sBAAuB,YAAW,uBAAuB;IAoCvD,oBAAoB,EAAE,MAAM;IAnCvC,SAAS,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAC1C,IAAW,WAAW,IAAI,iBAAiB,CAE1C;IAED,SAAS,CAAC,sBAAsB,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC9D,IAAW,qBAAqB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAE9D;IAEM,gBAAgB,EAAE,MAAM,CAAK;IAC7B,YAAY,EAAE,MAAM,CAAK;IACzB,gBAAgB,EAAE,OAAO,CAAS;IAEzC;;;OAGG;IACF,MAAM;IACP,OAAO,CAAC,kBAAkB,CAAa;IAEvC;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAAa;IAEhC,aAAa,EAAE,MAAM,CAAK;IACjC;;;OAGG;IACH,OAAO,CAAC,qBAAqB,CAAa;gBAG/B,oBAAoB,EAAE,MAAM;IACnC,wFAAwF;IACxF,eAAe,EAAE,iBAAiB;IAM/B,4BAA4B,CAAC,WAAW,EAAE,QAAQ,CAAC,iBAAiB,CA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HeuristicRunner {
82
82
  };
83
83
  }
84
84
  get idleTime() {
85
+ if (this.configuration.idleTime !== undefined) {
86
+ return this.configuration.idleTime;
87
+ }
85
88
  const maxIdleTime = this.configuration.maxIdleTime;
86
89
  const minIdleTime = this.configuration.minIdleTime;
87
90
  const weightedNumOfOps = getWeightedNumberOfOps(this.heuristicData.numRuntimeOps, this.heuristicData.numNonRuntimeOps, this.configuration.runtimeOpWeight, this.configuration.nonRuntimeOpWeight);
@@ -1 +1 @@
1
- {"version":3,"file":"summarizerHeuristics.js","sourceRoot":"","sources":["../src/summarizerHeuristics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAUrD,4EAA4E;AAC5E,MAAM,OAAO,sBAAsB;IAmC/B,YACW,oBAA4B;IACnC,wFAAwF;IACxF,eAAkC;QAF3B,yBAAoB,GAApB,oBAAoB,CAAQ;QAzBhC,qBAAgB,GAAW,CAAC,CAAC;QAC7B,iBAAY,GAAW,CAAC,CAAC;QACzB,qBAAgB,GAAY,KAAK,CAAC;QAEzC;;;WAGG;QACF,MAAM;QACC,uBAAkB,GAAW,CAAC,CAAC;QAEvC;;;WAGG;QACK,uBAAkB,GAAW,CAAC,CAAC;QAEhC,kBAAa,GAAW,CAAC,CAAC;QACjC;;;WAGG;QACK,0BAAqB,GAAW,CAAC,CAAC;QAOtC,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;QACpC,IAAI,CAAC,sBAAsB,qBAAQ,eAAe,CAAE,CAAC;IACzD,CAAC;IAxCD,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAGD,IAAW,qBAAqB;QAC5B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACvC,CAAC;IAmCM,4BAA4B,CAAC,WAAwC;QACxE,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,sBAAsB,qBAAQ,WAAW,CAAE,CAA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3C,aAAa,CAAC,aAAa,EAC3B,aAAa,CAAC,gBAAgB,EAC9B,aAAa,CAAC,eAAe,EAC7B,aAAa,CAAC,kBAAkB,CACnC,CAAC;QACF,OAAO,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC;IACnD,CAAC;CACJ;AAED,SAAS,oCAAoC;IACzC,OAAO;QACH,IAAI,+BAA+B,EAAE;QACrC,IAAI,mCAAmC,EAAE;KAC5C,CAAC;AACN,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { Timer } from \"@fluidframework/common-utils\";\nimport { ISummaryConfigurationHeuristics } from \"./containerRuntime\";\nimport {\n ISummarizeHeuristicData,\n ISummarizeHeuristicRunner,\n ISummarizeAttempt,\n ISummaryHeuristicStrategy,\n} from \"./summarizerTypes\";\nimport { SummarizeReason } from \"./summaryGenerator\";\n\n/** Simple implementation of class for tracking summarize heuristic data. */\nexport class SummarizeHeuristicData implements ISummarizeHeuristicData {\n protected _lastAttempt: ISummarizeAttempt;\n public get lastAttempt(): ISummarizeAttempt {\n return this._lastAttempt;\n }\n\n protected _lastSuccessfulSummary: Readonly<ISummarizeAttempt>;\n public get lastSuccessfulSummary(): Readonly<ISummarizeAttempt> {\n return this._lastSuccessfulSummary;\n }\n\n public numNonRuntimeOps: number = 0;\n public totalOpsSize: number = 0;\n public hasMissingOpData: boolean = false;\n\n /**\n * Cumulative size in bytes of all the ops at the beginning of the summarization attempt.\n * Is used to adjust totalOpsSize appropriately after successful summarization.\n */\n /** */\n private totalOpsSizeBefore: number = 0;\n\n /**\n * Number of system ops at beginning of attempting to summarize.\n * Is used to adjust numSystemOps appropriately after successful summarization.\n */\n private numSystemOpsBefore: number = 0;\n\n public numRuntimeOps: number = 0;\n /**\n * Number of non-system ops at beginning of attempting to summarize.\n * Is used to adjust numNonSystemOps appropriately after successful summarization.\n */\n private numNonSystemOpsBefore: number = 0;\n\n constructor(\n public lastOpSequenceNumber: number,\n /** Baseline attempt data used for comparisons with subsequent attempts/calculations. */\n attemptBaseline: ISummarizeAttempt,\n ) {\n this._lastAttempt = attemptBaseline;\n this._lastSuccessfulSummary = { ...attemptBaseline };\n }\n\n public updateWithLastSummaryAckInfo(lastSummary: Readonly<ISummarizeAttempt>) {\n this._lastAttempt = lastSummary;\n this._lastSuccessfulSummary = { ...lastSummary };\n }\n\n public recordAttempt(refSequenceNumber?: number) {\n this._lastAttempt = {\n refSequenceNumber: refSequenceNumber ?? this.lastOpSequenceNumber,\n summaryTime: Date.now(),\n };\n\n this.numSystemOpsBefore = this.numNonRuntimeOps;\n this.numNonSystemOpsBefore = this.numRuntimeOps;\n this.totalOpsSizeBefore = this.totalOpsSize;\n }\n\n public markLastAttemptAsSuccessful() {\n this._lastSuccessfulSummary = { ...this.lastAttempt };\n\n this.numNonRuntimeOps -= this.numSystemOpsBefore;\n this.numSystemOpsBefore = 0;\n\n this.numRuntimeOps -= this.numNonSystemOpsBefore;\n this.numNonSystemOpsBefore = 0;\n\n this.totalOpsSize -= this.totalOpsSizeBefore;\n this.totalOpsSizeBefore = 0;\n }\n}\n\n/**\n * This class contains the heuristics for when to summarize.\n */\nexport class SummarizeHeuristicRunner implements ISummarizeHeuristicRunner {\n private readonly idleTimer: Timer | undefined;\n private readonly runSummarize: (reason: SummarizeReason) => void;\n\n public constructor(\n private readonly heuristicData: ISummarizeHeuristicData,\n private readonly configuration: ISummaryConfigurationHeuristics,\n trySummarize: (reason: SummarizeReason) => void,\n private readonly logger: ITelemetryLogger,\n private readonly summarizeStrategies: ISummaryHeuristicStrategy[] = getDefaultSummaryHeuristicStrategies(),\n ) {\n this.idleTimer = new Timer(\n this.idleTime,\n () => this.runSummarize(\"idle\"));\n\n this.runSummarize = (reason: SummarizeReason) => {\n this.idleTimer?.clear();\n\n // We shouldn't attempt a summary if there are no new processed ops\n const opsSinceLastAck = this.opsSinceLastAck;\n if (opsSinceLastAck > 0) {\n trySummarize(reason);\n }\n };\n }\n\n public get idleTime(): number {\n const maxIdleTime = this.configuration.maxIdleTime;\n const minIdleTime = this.configuration.minIdleTime;\n const weightedNumOfOps = getWeightedNumberOfOps(\n this.heuristicData.numRuntimeOps,\n this.heuristicData.numNonRuntimeOps,\n this.configuration.runtimeOpWeight,\n this.configuration.nonRuntimeOpWeight,\n );\n const pToMaxOps = weightedNumOfOps * 1.0 / this.configuration.maxOps;\n\n if (pToMaxOps >= 1) {\n return minIdleTime;\n }\n\n // Return a ratioed idle time based on the percentage of ops\n return maxIdleTime - ((maxIdleTime - minIdleTime) * pToMaxOps);\n }\n\n public get opsSinceLastAck(): number {\n return this.heuristicData.lastOpSequenceNumber - this.heuristicData.lastSuccessfulSummary.refSequenceNumber;\n }\n\n public start() {\n this.idleTimer?.start(this.idleTime);\n }\n\n public run() {\n for (const strategy of this.summarizeStrategies) {\n if (strategy.shouldRunSummary(this.configuration, this.heuristicData)) {\n return this.runSummarize(strategy.summarizeReason);\n }\n }\n\n this.idleTimer?.restart(this.idleTime);\n }\n\n public shouldRunLastSummary(): boolean {\n const opsSinceLastAck = this.opsSinceLastAck;\n const minOpsForLastSummaryAttempt = this.configuration.minOpsForLastSummaryAttempt;\n\n this.logger.sendTelemetryEvent({\n eventName: \"ShouldRunLastSummary\",\n opsSinceLastAck,\n minOpsForLastSummaryAttempt,\n });\n\n return opsSinceLastAck >= minOpsForLastSummaryAttempt;\n }\n\n public dispose() {\n this.idleTimer?.clear();\n }\n}\n\n/** Strategy used to run a summary when it's been a while since our last successful summary */\nclass MaxTimeSummaryHeuristicStrategy implements ISummaryHeuristicStrategy {\n public readonly summarizeReason: Readonly<SummarizeReason> = \"maxTime\";\n\n public shouldRunSummary(\n configuration: ISummaryConfigurationHeuristics,\n heuristicData: ISummarizeHeuristicData,\n ): boolean {\n const timeSinceLastSummary = Date.now() - heuristicData.lastSuccessfulSummary.summaryTime;\n return timeSinceLastSummary > configuration.maxTime;\n }\n}\n\nfunction getWeightedNumberOfOps(\n runtimeOpCount: number,\n nonRuntimeOpCount: number,\n runtimeOpWeight: number,\n nonRuntimeOpWeight: number,\n): number {\n return (runtimeOpWeight * runtimeOpCount)\n + (nonRuntimeOpWeight * nonRuntimeOpCount);\n}\n\n/** Strategy used to do a weighted analysis on the ops we've processed since the last successful summary */\nclass WeightedOpsSummaryHeuristicStrategy implements ISummaryHeuristicStrategy {\n public readonly summarizeReason: Readonly<SummarizeReason> = \"maxOps\";\n\n public shouldRunSummary(\n configuration: ISummaryConfigurationHeuristics,\n heuristicData: ISummarizeHeuristicData,\n ): boolean {\n const weightedNumOfOps = getWeightedNumberOfOps(\n heuristicData.numRuntimeOps,\n heuristicData.numNonRuntimeOps,\n configuration.runtimeOpWeight,\n configuration.nonRuntimeOpWeight,\n );\n return weightedNumOfOps > configuration.maxOps;\n }\n}\n\nfunction getDefaultSummaryHeuristicStrategies() {\n return [\n new MaxTimeSummaryHeuristicStrategy(),\n new WeightedOpsSummaryHeuristicStrategy(),\n ];\n}\n"]}
1
+ {"version":3,"file":"summarizerHeuristics.js","sourceRoot":"","sources":["../src/summarizerHeuristics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAUrD,4EAA4E;AAC5E,MAAM,OAAO,sBAAsB;IAmC/B,YACW,oBAA4B;IACnC,wFAAwF;IACxF,eAAkC;QAF3B,yBAAoB,GAApB,oBAAoB,CAAQ;QAzBhC,qBAAgB,GAAW,CAAC,CAAC;QAC7B,iBAAY,GAAW,CAAC,CAAC;QACzB,qBAAgB,GAAY,KAAK,CAAC;QAEzC;;;WAGG;QACF,MAAM;QACC,uBAAkB,GAAW,CAAC,CAAC;QAEvC;;;WAGG;QACK,uBAAkB,GAAW,CAAC,CAAC;QAEhC,kBAAa,GAAW,CAAC,CAAC;QACjC;;;WAGG;QACK,0BAAqB,GAAW,CAAC,CAAC;QAOtC,IAAI,CAAC,YAAY,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AAG,aAAa,CAAC,qBAAqB,CAAC,WAAW,CAAC;QAC1F,OAAO,oBAAoB,GAAG,aAAa,CAAC,OAAO,CAAC;IACxD,CAAC;CACJ;AAED,SAAS,sBAAsB,CAC3B,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,kBAA0B;IAE1B,OAAO,CAAC,eAAe,GAAG,cAAc,CAAC;UAClC,CAAC,kBAAkB,GAAG,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAED,2GAA2G;AAC3G,MAAM,mCAAmC;IAAzC;QACoB,oBAAe,GAA8B,QAAQ,CAAC;IAc1E,CAAC;IAZU,gBAAgB,CACnB,aAA8C,EAC9C,aAAsC;QAEtC,MAAM,gBAAgB,GAAG,sBAAsB,CAC3C,aAAa,CAAC,aAAa,EAC3B,aAAa,CAAC,gBAAgB,EAC9B,aAAa,CAAC,eAAe,EAC7B,aAAa,CAAC,kBAAkB,CACnC,CAAC;QACF,OAAO,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC;IACnD,CAAC;CACJ;AAED,SAAS,oCAAoC;IACzC,OAAO;QACH,IAAI,+BAA+B,EAAE;QACrC,IAAI,mCAAmC,EAAE;KAC5C,CAAC;AACN,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { Timer } from \"@fluidframework/common-utils\";\nimport { ISummaryConfigurationHeuristics } from \"./containerRuntime\";\nimport {\n ISummarizeHeuristicData,\n ISummarizeHeuristicRunner,\n ISummarizeAttempt,\n ISummaryHeuristicStrategy,\n} from \"./summarizerTypes\";\nimport { SummarizeReason } from \"./summaryGenerator\";\n\n/** Simple implementation of class for tracking summarize heuristic data. */\nexport class SummarizeHeuristicData implements ISummarizeHeuristicData {\n protected _lastAttempt: ISummarizeAttempt;\n public get lastAttempt(): ISummarizeAttempt {\n return this._lastAttempt;\n }\n\n protected _lastSuccessfulSummary: Readonly<ISummarizeAttempt>;\n public get lastSuccessfulSummary(): Readonly<ISummarizeAttempt> {\n return this._lastSuccessfulSummary;\n }\n\n public numNonRuntimeOps: number = 0;\n public totalOpsSize: number = 0;\n public hasMissingOpData: boolean = false;\n\n /**\n * Cumulative size in bytes of all the ops at the beginning of the summarization attempt.\n * Is used to adjust totalOpsSize appropriately after successful summarization.\n */\n /** */\n private totalOpsSizeBefore: number = 0;\n\n /**\n * Number of system ops at beginning of attempting to summarize.\n * Is used to adjust numSystemOps appropriately after successful summarization.\n */\n private numSystemOpsBefore: number = 0;\n\n public numRuntimeOps: number = 0;\n /**\n * Number of non-system ops at beginning of attempting to summarize.\n * Is used to adjust numNonSystemOps appropriately after successful summarization.\n */\n private numNonSystemOpsBefore: number = 0;\n\n constructor(\n public lastOpSequenceNumber: number,\n /** Baseline attempt data used for comparisons with subsequent attempts/calculations. */\n attemptBaseline: ISummarizeAttempt,\n ) {\n this._lastAttempt = attemptBaseline;\n this._lastSuccessfulSummary = { ...attemptBaseline };\n }\n\n public updateWithLastSummaryAckInfo(lastSummary: Readonly<ISummarizeAttempt>) {\n this._lastAttempt = lastSummary;\n this._lastSuccessfulSummary = { ...lastSummary };\n }\n\n public recordAttempt(refSequenceNumber?: number) {\n this._lastAttempt = {\n refSequenceNumber: refSequenceNumber ?? this.lastOpSequenceNumber,\n summaryTime: Date.now(),\n };\n\n this.numSystemOpsBefore = this.numNonRuntimeOps;\n this.numNonSystemOpsBefore = this.numRuntimeOps;\n this.totalOpsSizeBefore = this.totalOpsSize;\n }\n\n public markLastAttemptAsSuccessful() {\n this._lastSuccessfulSummary = { ...this.lastAttempt };\n\n this.numNonRuntimeOps -= this.numSystemOpsBefore;\n this.numSystemOpsBefore = 0;\n\n this.numRuntimeOps -= this.numNonSystemOpsBefore;\n this.numNonSystemOpsBefore = 0;\n\n this.totalOpsSize -= this.totalOpsSizeBefore;\n this.totalOpsSizeBefore = 0;\n }\n}\n\n/**\n * This class contains the heuristics for when to summarize.\n */\nexport class SummarizeHeuristicRunner implements ISummarizeHeuristicRunner {\n private readonly idleTimer: Timer | undefined;\n private readonly runSummarize: (reason: SummarizeReason) => void;\n\n public constructor(\n private readonly heuristicData: ISummarizeHeuristicData,\n private readonly configuration: ISummaryConfigurationHeuristics,\n trySummarize: (reason: SummarizeReason) => void,\n private readonly logger: ITelemetryLogger,\n private readonly summarizeStrategies: ISummaryHeuristicStrategy[] = getDefaultSummaryHeuristicStrategies(),\n ) {\n this.idleTimer = new Timer(\n this.idleTime,\n () => this.runSummarize(\"idle\"));\n\n this.runSummarize = (reason: SummarizeReason) => {\n this.idleTimer?.clear();\n\n // We shouldn't attempt a summary if there are no new processed ops\n const opsSinceLastAck = this.opsSinceLastAck;\n if (opsSinceLastAck > 0) {\n trySummarize(reason);\n }\n };\n }\n\n public get idleTime(): number {\n if (this.configuration.idleTime !== undefined) {\n return this.configuration.idleTime;\n }\n const maxIdleTime = this.configuration.maxIdleTime;\n const minIdleTime = this.configuration.minIdleTime;\n const weightedNumOfOps = getWeightedNumberOfOps(\n this.heuristicData.numRuntimeOps,\n this.heuristicData.numNonRuntimeOps,\n this.configuration.runtimeOpWeight,\n this.configuration.nonRuntimeOpWeight,\n );\n const pToMaxOps = weightedNumOfOps * 1.0 / this.configuration.maxOps;\n\n if (pToMaxOps >= 1) {\n return minIdleTime;\n }\n\n // Return a ratioed idle time based on the percentage of ops\n return maxIdleTime - ((maxIdleTime - minIdleTime) * pToMaxOps);\n }\n\n public get opsSinceLastAck(): number {\n return this.heuristicData.lastOpSequenceNumber - this.heuristicData.lastSuccessfulSummary.refSequenceNumber;\n }\n\n public start() {\n this.idleTimer?.start(this.idleTime);\n }\n\n public run() {\n for (const strategy of this.summarizeStrategies) {\n if (strategy.shouldRunSummary(this.configuration, this.heuristicData)) {\n return this.runSummarize(strategy.summarizeReason);\n }\n }\n\n this.idleTimer?.restart(this.idleTime);\n }\n\n public shouldRunLastSummary(): boolean {\n const opsSinceLastAck = this.opsSinceLastAck;\n const minOpsForLastSummaryAttempt = this.configuration.minOpsForLastSummaryAttempt;\n\n this.logger.sendTelemetryEvent({\n eventName: \"ShouldRunLastSummary\",\n opsSinceLastAck,\n minOpsForLastSummaryAttempt,\n });\n\n return opsSinceLastAck >= minOpsForLastSummaryAttempt;\n }\n\n public dispose() {\n this.idleTimer?.clear();\n }\n}\n\n/** Strategy used to run a summary when it's been a while since our last successful summary */\nclass MaxTimeSummaryHeuristicStrategy implements ISummaryHeuristicStrategy {\n public readonly summarizeReason: Readonly<SummarizeReason> = \"maxTime\";\n\n public shouldRunSummary(\n configuration: ISummaryConfigurationHeuristics,\n heuristicData: ISummarizeHeuristicData,\n ): boolean {\n const timeSinceLastSummary = Date.now() - heuristicData.lastSuccessfulSummary.summaryTime;\n return timeSinceLastSummary > configuration.maxTime;\n }\n}\n\nfunction getWeightedNumberOfOps(\n runtimeOpCount: number,\n nonRuntimeOpCount: number,\n runtimeOpWeight: number,\n nonRuntimeOpWeight: number,\n): number {\n return (runtimeOpWeight * runtimeOpCount)\n + (nonRuntimeOpWeight * nonRuntimeOpCount);\n}\n\n/** Strategy used to do a weighted analysis on the ops we've processed since the last successful summary */\nclass WeightedOpsSummaryHeuristicStrategy implements ISummaryHeuristicStrategy {\n public readonly summarizeReason: Readonly<SummarizeReason> = \"maxOps\";\n\n public shouldRunSummary(\n configuration: ISummaryConfigurationHeuristics,\n heuristicData: ISummarizeHeuristicData,\n ): boolean {\n const weightedNumOfOps = getWeightedNumberOfOps(\n heuristicData.numRuntimeOps,\n heuristicData.numNonRuntimeOps,\n configuration.runtimeOpWeight,\n configuration.nonRuntimeOpWeight,\n );\n return weightedNumOfOps > configuration.maxOps;\n }\n}\n\nfunction getDefaultSummaryHeuristicStrategies() {\n return [\n new MaxTimeSummaryHeuristicStrategy(),\n new WeightedOpsSummaryHeuristicStrategy(),\n ];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.0.0-internal.1.4.2",
3
+ "version": "2.0.0-internal.1.4.3",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -63,19 +63,19 @@
63
63
  "dependencies": {
64
64
  "@fluidframework/common-definitions": "^0.20.1",
65
65
  "@fluidframework/common-utils": "^1.0.0",
66
- "@fluidframework/container-definitions": "^2.0.0-internal.1.4.2",
67
- "@fluidframework/container-runtime-definitions": "^2.0.0-internal.1.4.2",
68
- "@fluidframework/container-utils": "^2.0.0-internal.1.4.2",
69
- "@fluidframework/core-interfaces": "^2.0.0-internal.1.4.2",
70
- "@fluidframework/datastore": "^2.0.0-internal.1.4.2",
71
- "@fluidframework/driver-definitions": "^2.0.0-internal.1.4.2",
72
- "@fluidframework/driver-utils": "^2.0.0-internal.1.4.2",
73
- "@fluidframework/garbage-collector": "^2.0.0-internal.1.4.2",
66
+ "@fluidframework/container-definitions": "^2.0.0-internal.1.4.3",
67
+ "@fluidframework/container-runtime-definitions": "^2.0.0-internal.1.4.3",
68
+ "@fluidframework/container-utils": "^2.0.0-internal.1.4.3",
69
+ "@fluidframework/core-interfaces": "^2.0.0-internal.1.4.3",
70
+ "@fluidframework/datastore": "^2.0.0-internal.1.4.3",
71
+ "@fluidframework/driver-definitions": "^2.0.0-internal.1.4.3",
72
+ "@fluidframework/driver-utils": "^2.0.0-internal.1.4.3",
73
+ "@fluidframework/garbage-collector": "^2.0.0-internal.1.4.3",
74
74
  "@fluidframework/protocol-base": "^0.1037.2001",
75
75
  "@fluidframework/protocol-definitions": "^1.0.0",
76
- "@fluidframework/runtime-definitions": "^2.0.0-internal.1.4.2",
77
- "@fluidframework/runtime-utils": "^2.0.0-internal.1.4.2",
78
- "@fluidframework/telemetry-utils": "^2.0.0-internal.1.4.2",
76
+ "@fluidframework/runtime-definitions": "^2.0.0-internal.1.4.3",
77
+ "@fluidframework/runtime-utils": "^2.0.0-internal.1.4.3",
78
+ "@fluidframework/telemetry-utils": "^2.0.0-internal.1.4.3",
79
79
  "double-ended-queue": "^2.1.0-0",
80
80
  "uuid": "^8.3.1"
81
81
  },
@@ -84,8 +84,8 @@
84
84
  "@fluidframework/build-tools": "^0.4.4000",
85
85
  "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@^1.0.0",
86
86
  "@fluidframework/eslint-config-fluid": "^1.0.0",
87
- "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.4.2",
88
- "@fluidframework/test-runtime-utils": "^2.0.0-internal.1.4.2",
87
+ "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.4.3",
88
+ "@fluidframework/test-runtime-utils": "^2.0.0-internal.1.4.3",
89
89
  "@microsoft/api-extractor": "^7.22.2",
90
90
  "@rushstack/eslint-config": "^2.5.1",
91
91
  "@types/double-ended-queue": "^2.1.0",
@@ -108,13 +108,16 @@
108
108
  "version": "2.0.0",
109
109
  "broken": {
110
110
  "VariableDeclaration_DefaultSummaryConfiguration": {
111
- "forwardCompat": false
111
+ "forwardCompat": false,
112
+ "backCompat": false
112
113
  },
113
114
  "TypeAliasDeclaration_ISummaryConfiguration": {
114
- "forwardCompat": false
115
+ "forwardCompat": false,
116
+ "backCompat": false
115
117
  },
116
118
  "InterfaceDeclaration_ISummaryConfigurationHeuristics": {
117
- "forwardCompat": false
119
+ "forwardCompat": false,
120
+ "backCompat": false
118
121
  },
119
122
  "InterfaceDeclaration_IGeneratedSummaryStats": {
120
123
  "backCompat": false
@@ -233,7 +233,7 @@ export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfigurati
233
233
  * @deprecated Please move all implementations to {@link ISummaryConfigurationHeuristics.minIdleTime} and
234
234
  * {@link ISummaryConfigurationHeuristics.maxIdleTime} instead.
235
235
  */
236
- idleTime: number;
236
+ idleTime?: number;
237
237
  /**
238
238
  * Defines the maximum allowed time, since the last received Ack, before running the summary
239
239
  * with reason maxTime.
@@ -297,8 +297,6 @@ export type ISummaryConfiguration =
297
297
  export const DefaultSummaryConfiguration: ISummaryConfiguration = {
298
298
  state: "enabled",
299
299
 
300
- idleTime: 15 * 1000, // 15 secs.
301
-
302
300
  minIdleTime: 0,
303
301
 
304
302
  maxIdleTime: 30 * 1000, // 30 secs.
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-internal.1.4.2";
9
+ export const pkgVersion = "2.0.0-internal.1.4.3";
@@ -119,6 +119,9 @@ export class SummarizeHeuristicRunner implements ISummarizeHeuristicRunner {
119
119
  }
120
120
 
121
121
  public get idleTime(): number {
122
+ if (this.configuration.idleTime !== undefined) {
123
+ return this.configuration.idleTime;
124
+ }
122
125
  const maxIdleTime = this.configuration.maxIdleTime;
123
126
  const minIdleTime = this.configuration.minIdleTime;
124
127
  const weightedNumOfOps = getWeightedNumberOfOps(