@fluid-experimental/tree 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0
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.
- package/CHANGELOG.md +23 -0
- package/api-report/experimental-tree.api.md +2 -2
- package/dist/ChangeCompression.d.ts +2 -2
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +1 -1
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +1 -1
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +4 -4
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +3 -3
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +17 -17
- package/dist/Checkout.js.map +1 -1
- package/dist/EditLog.d.ts +1 -1
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +9 -9
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +3 -3
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +6 -6
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +23 -23
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +1 -1
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +7 -7
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js.map +1 -1
- package/dist/LogViewer.d.ts +2 -2
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +7 -7
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +1 -1
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +1 -1
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +1 -1
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js +2 -2
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +1 -1
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -2
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +2 -2
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +1 -1
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +8 -7
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +78 -78
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +1 -1
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +31 -31
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/Summary.d.ts +2 -2
- package/dist/Summary.d.ts.map +1 -1
- package/dist/Summary.js +2 -2
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +1 -1
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +3 -3
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +3 -3
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +3 -3
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +6 -6
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +5 -1
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +5 -5
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +1 -1
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +1 -1
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +2 -3
- package/dist/TreeView.js.map +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +3 -3
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +1 -1
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +25 -26
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js +2 -2
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +2 -1
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +8 -9
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js +11 -11
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +8 -4
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +13 -13
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js +2 -2
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/packageVersion.d.ts +0 -2
- package/dist/migration-shim/packageVersion.d.ts.map +1 -1
- package/dist/migration-shim/packageVersion.js +0 -2
- package/dist/migration-shim/packageVersion.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +8 -8
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +2 -2
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js +8 -4
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js +2 -2
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/dist/migration-shim/shimChannelServices.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js +2 -2
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/shimHandle.d.ts.map +1 -1
- package/dist/migration-shim/shimHandle.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/migration-shim/utils.d.ts +1 -1
- package/dist/migration-shim/utils.d.ts.map +1 -1
- package/dist/migration-shim/utils.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +1 -1
- package/dist/persisted-types/0.0.2.d.ts.map +1 -1
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +1 -1
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/lib/ChangeCompression.d.ts +2 -2
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +1 -1
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +1 -1
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +2 -2
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +3 -3
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +4 -4
- package/lib/Checkout.js.map +1 -1
- package/lib/EditLog.d.ts +1 -1
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +2 -2
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +3 -3
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +5 -5
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +1 -1
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +5 -5
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js.map +1 -1
- package/lib/LogViewer.d.ts +2 -2
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +3 -3
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +1 -1
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +1 -1
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +1 -1
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +1 -1
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -2
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +2 -2
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +1 -1
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +8 -7
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +13 -13
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +1 -1
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +5 -5
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/Summary.d.ts +2 -2
- package/lib/Summary.d.ts.map +1 -1
- package/lib/Summary.js +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +1 -1
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +3 -3
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +3 -3
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +3 -3
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +3 -3
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +5 -1
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +2 -2
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.d.ts +1 -1
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +1 -1
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +1 -2
- package/lib/TreeView.js.map +1 -1
- package/lib/UuidUtilities.d.ts.map +1 -1
- package/lib/UuidUtilities.js +1 -1
- package/lib/UuidUtilities.js.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +1 -1
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +4 -5
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -1
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +1 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +8 -4
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +3 -3
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/packageVersion.d.ts +0 -2
- package/lib/migration-shim/packageVersion.d.ts.map +1 -1
- package/lib/migration-shim/packageVersion.js +0 -2
- package/lib/migration-shim/packageVersion.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +2 -2
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js +6 -2
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/lib/migration-shim/shimChannelServices.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js +1 -1
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/shimHandle.d.ts.map +1 -1
- package/lib/migration-shim/shimHandle.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/migration-shim/utils.d.ts +1 -1
- package/lib/migration-shim/utils.d.ts.map +1 -1
- package/lib/migration-shim/utils.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +1 -1
- package/lib/persisted-types/0.0.2.d.ts.map +1 -1
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +1 -1
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +1 -1
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/package.json +33 -32
- package/src/ChangeCompression.ts +8 -8
- package/src/ChangeTypes.ts +5 -4
- package/src/Checkout.ts +9 -7
- package/src/EditLog.ts +4 -3
- package/src/EditUtilities.ts +9 -8
- package/src/Forest.ts +3 -2
- package/src/HistoryEditFactory.ts +12 -11
- package/src/IdConversion.ts +2 -2
- package/src/LogViewer.ts +5 -4
- package/src/MergeHealth.ts +2 -1
- package/src/NodeIdUtilities.ts +2 -2
- package/src/PayloadUtilities.ts +2 -1
- package/src/ReconciliationPath.ts +1 -1
- package/src/RevisionValueCache.ts +3 -2
- package/src/RevisionView.ts +3 -3
- package/src/SerializationUtilities.ts +1 -1
- package/src/SharedTree.ts +46 -49
- package/src/SharedTreeEncoder.ts +30 -29
- package/src/Summary.ts +5 -3
- package/src/SummaryBackCompatibility.ts +1 -0
- package/src/SummaryTestUtilities.ts +2 -1
- package/src/Transaction.ts +7 -6
- package/src/TransactionInternal.ts +17 -16
- package/src/TreeCompressor.ts +6 -4
- package/src/TreeNodeHandle.ts +2 -2
- package/src/TreeView.ts +3 -3
- package/src/UuidUtilities.ts +2 -1
- package/src/id-compressor/AppendOnlySortedMap.ts +2 -1
- package/src/id-compressor/IdCompressor.ts +18 -17
- package/src/id-compressor/IdRange.ts +2 -1
- package/src/id-compressor/NumericUuid.ts +1 -1
- package/src/id-compressor/SessionIdNormalizer.ts +3 -3
- package/src/migration-shim/migrationDeltaHandler.ts +3 -2
- package/src/migration-shim/migrationShim.ts +14 -10
- package/src/migration-shim/migrationShimFactory.ts +6 -4
- package/src/migration-shim/packageVersion.ts +0 -2
- package/src/migration-shim/sharedTreeDeltaHandler.ts +3 -2
- package/src/migration-shim/sharedTreeShim.ts +7 -5
- package/src/migration-shim/sharedTreeShimFactory.ts +3 -3
- package/src/migration-shim/shimChannelServices.ts +1 -1
- package/src/migration-shim/shimDeltaConnection.ts +3 -2
- package/src/migration-shim/shimHandle.ts +1 -0
- package/src/migration-shim/types.ts +3 -1
- package/src/migration-shim/utils.ts +2 -1
- package/src/persisted-types/0.0.2.ts +2 -2
- package/src/persisted-types/0.1.1.ts +10 -8
- package/dist/tree-alpha.d.ts +0 -2901
- package/dist/tree-beta.d.ts +0 -348
- package/dist/tree-public.d.ts +0 -348
- package/dist/tree-untrimmed.d.ts +0 -3820
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +0 -49
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.js +0 -213
- package/lib/test/AppendOnlySortedMap.tests.js.map +0 -1
- package/lib/test/ChangeCompression.tests.d.ts +0 -6
- package/lib/test/ChangeCompression.tests.d.ts.map +0 -1
- package/lib/test/ChangeCompression.tests.js +0 -154
- package/lib/test/ChangeCompression.tests.js.map +0 -1
- package/lib/test/Checkout.tests.d.ts +0 -10
- package/lib/test/Checkout.tests.d.ts.map +0 -1
- package/lib/test/Checkout.tests.js +0 -460
- package/lib/test/Checkout.tests.js.map +0 -1
- package/lib/test/Common.tests.d.ts +0 -6
- package/lib/test/Common.tests.d.ts.map +0 -1
- package/lib/test/Common.tests.js +0 -102
- package/lib/test/Common.tests.js.map +0 -1
- package/lib/test/EagerCheckout.tests.d.ts +0 -6
- package/lib/test/EagerCheckout.tests.d.ts.map +0 -1
- package/lib/test/EagerCheckout.tests.js +0 -20
- package/lib/test/EagerCheckout.tests.js.map +0 -1
- package/lib/test/Edit.tests.d.ts +0 -6
- package/lib/test/Edit.tests.d.ts.map +0 -1
- package/lib/test/Edit.tests.js +0 -60
- package/lib/test/Edit.tests.js.map +0 -1
- package/lib/test/EditLog.perf.tests.d.ts +0 -6
- package/lib/test/EditLog.perf.tests.d.ts.map +0 -1
- package/lib/test/EditLog.perf.tests.js +0 -41
- package/lib/test/EditLog.perf.tests.js.map +0 -1
- package/lib/test/EditLog.tests.d.ts +0 -6
- package/lib/test/EditLog.tests.d.ts.map +0 -1
- package/lib/test/EditLog.tests.js +0 -355
- package/lib/test/EditLog.tests.js.map +0 -1
- package/lib/test/EditUtilities.tests.d.ts +0 -6
- package/lib/test/EditUtilities.tests.d.ts.map +0 -1
- package/lib/test/EditUtilities.tests.js +0 -512
- package/lib/test/EditUtilities.tests.js.map +0 -1
- package/lib/test/Forest.perf.tests.d.ts +0 -6
- package/lib/test/Forest.perf.tests.d.ts.map +0 -1
- package/lib/test/Forest.perf.tests.js +0 -135
- package/lib/test/Forest.perf.tests.js.map +0 -1
- package/lib/test/Forest.tests.d.ts +0 -6
- package/lib/test/Forest.tests.d.ts.map +0 -1
- package/lib/test/Forest.tests.js +0 -213
- package/lib/test/Forest.tests.js.map +0 -1
- package/lib/test/GenericTransaction.tests.d.ts +0 -6
- package/lib/test/GenericTransaction.tests.d.ts.map +0 -1
- package/lib/test/GenericTransaction.tests.js +0 -31
- package/lib/test/GenericTransaction.tests.js.map +0 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +0 -6
- package/lib/test/HistoryEditFactory.tests.d.ts.map +0 -1
- package/lib/test/HistoryEditFactory.tests.js +0 -170
- package/lib/test/HistoryEditFactory.tests.js.map +0 -1
- package/lib/test/IdCompressor.perf.tests.d.ts +0 -6
- package/lib/test/IdCompressor.perf.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.perf.tests.js +0 -290
- package/lib/test/IdCompressor.perf.tests.js.map +0 -1
- package/lib/test/IdCompressor.tests.d.ts +0 -6
- package/lib/test/IdCompressor.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.tests.js +0 -1542
- package/lib/test/IdCompressor.tests.js.map +0 -1
- package/lib/test/IdConversion.tests.d.ts +0 -6
- package/lib/test/IdConversion.tests.d.ts.map +0 -1
- package/lib/test/IdConversion.tests.js +0 -36
- package/lib/test/IdConversion.tests.js.map +0 -1
- package/lib/test/LazyCheckout.tests.d.ts +0 -6
- package/lib/test/LazyCheckout.tests.d.ts.map +0 -1
- package/lib/test/LazyCheckout.tests.js +0 -22
- package/lib/test/LazyCheckout.tests.js.map +0 -1
- package/lib/test/LogViewer.tests.d.ts +0 -6
- package/lib/test/LogViewer.tests.d.ts.map +0 -1
- package/lib/test/LogViewer.tests.js +0 -588
- package/lib/test/LogViewer.tests.js.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts +0 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +0 -351
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +0 -1
- package/lib/test/NumericUuid.perf.tests.d.ts +0 -6
- package/lib/test/NumericUuid.perf.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.perf.tests.js +0 -68
- package/lib/test/NumericUuid.perf.tests.js.map +0 -1
- package/lib/test/NumericUuid.tests.d.ts +0 -6
- package/lib/test/NumericUuid.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.tests.js +0 -192
- package/lib/test/NumericUuid.tests.js.map +0 -1
- package/lib/test/RevisionValueCache.tests.d.ts +0 -6
- package/lib/test/RevisionValueCache.tests.d.ts.map +0 -1
- package/lib/test/RevisionValueCache.tests.js +0 -106
- package/lib/test/RevisionValueCache.tests.js.map +0 -1
- package/lib/test/RevisionView.tests.d.ts +0 -6
- package/lib/test/RevisionView.tests.d.ts.map +0 -1
- package/lib/test/RevisionView.tests.js +0 -131
- package/lib/test/RevisionView.tests.js.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.d.ts +0 -6
- package/lib/test/SessionIdNormalizer.tests.d.ts.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.js +0 -377
- package/lib/test/SessionIdNormalizer.tests.js.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.d.ts +0 -6
- package/lib/test/SharedTree.fuzz.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.js +0 -9
- package/lib/test/SharedTree.fuzz.tests.js.map +0 -1
- package/lib/test/SharedTree.perf.tests.d.ts +0 -6
- package/lib/test/SharedTree.perf.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.perf.tests.js +0 -39
- package/lib/test/SharedTree.perf.tests.js.map +0 -1
- package/lib/test/SharedTree.tests.d.ts +0 -6
- package/lib/test/SharedTree.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.tests.js +0 -22
- package/lib/test/SharedTree.tests.js.map +0 -1
- package/lib/test/StringInterner.tests.d.ts +0 -6
- package/lib/test/StringInterner.tests.d.ts.map +0 -1
- package/lib/test/StringInterner.tests.js +0 -73
- package/lib/test/StringInterner.tests.js.map +0 -1
- package/lib/test/Summary.tests.d.ts +0 -7
- package/lib/test/Summary.tests.d.ts.map +0 -1
- package/lib/test/Summary.tests.js +0 -386
- package/lib/test/Summary.tests.js.map +0 -1
- package/lib/test/Transaction.tests.d.ts +0 -6
- package/lib/test/Transaction.tests.d.ts.map +0 -1
- package/lib/test/Transaction.tests.js +0 -124
- package/lib/test/Transaction.tests.js.map +0 -1
- package/lib/test/TransactionInternal.tests.d.ts +0 -6
- package/lib/test/TransactionInternal.tests.d.ts.map +0 -1
- package/lib/test/TransactionInternal.tests.js +0 -576
- package/lib/test/TransactionInternal.tests.js.map +0 -1
- package/lib/test/TreeCompression.tests.d.ts +0 -6
- package/lib/test/TreeCompression.tests.d.ts.map +0 -1
- package/lib/test/TreeCompression.tests.js +0 -291
- package/lib/test/TreeCompression.tests.js.map +0 -1
- package/lib/test/TreeView.tests.d.ts +0 -6
- package/lib/test/TreeView.tests.d.ts.map +0 -1
- package/lib/test/TreeView.tests.js +0 -178
- package/lib/test/TreeView.tests.js.map +0 -1
- package/lib/test/UndoRedoHandler.tests.d.ts +0 -6
- package/lib/test/UndoRedoHandler.tests.d.ts.map +0 -1
- package/lib/test/UndoRedoHandler.tests.js +0 -37
- package/lib/test/UndoRedoHandler.tests.js.map +0 -1
- package/lib/test/fuzz/Generators.d.ts +0 -8
- package/lib/test/fuzz/Generators.d.ts.map +0 -1
- package/lib/test/fuzz/Generators.js +0 -345
- package/lib/test/fuzz/Generators.js.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +0 -23
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +0 -241
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +0 -1
- package/lib/test/fuzz/Types.d.ts +0 -136
- package/lib/test/fuzz/Types.d.ts.map +0 -1
- package/lib/test/fuzz/Types.js +0 -6
- package/lib/test/fuzz/Types.js.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +0 -246
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +0 -608
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +0 -1
- package/lib/test/utilities/MockTransaction.d.ts +0 -35
- package/lib/test/utilities/MockTransaction.d.ts.map +0 -1
- package/lib/test/utilities/MockTransaction.js +0 -51
- package/lib/test/utilities/MockTransaction.js.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +0 -12
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.js +0 -223
- package/lib/test/utilities/PendingLocalStateTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +0 -12
- package/lib/test/utilities/SharedTreeTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeTests.js +0 -949
- package/lib/test/utilities/SharedTreeTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +0 -11
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +0 -439
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +0 -10
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +0 -105
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +0 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +0 -11
- package/lib/test/utilities/SummarySizeTests.d.ts.map +0 -1
- package/lib/test/utilities/SummarySizeTests.js +0 -160
- package/lib/test/utilities/SummarySizeTests.js.map +0 -1
- package/lib/test/utilities/TestCommon.d.ts +0 -13
- package/lib/test/utilities/TestCommon.d.ts.map +0 -1
- package/lib/test/utilities/TestCommon.js +0 -19
- package/lib/test/utilities/TestCommon.js.map +0 -1
- package/lib/test/utilities/TestNode.d.ts +0 -140
- package/lib/test/utilities/TestNode.d.ts.map +0 -1
- package/lib/test/utilities/TestNode.js +0 -282
- package/lib/test/utilities/TestNode.js.map +0 -1
- package/lib/test/utilities/TestSerializer.d.ts +0 -24
- package/lib/test/utilities/TestSerializer.d.ts.map +0 -1
- package/lib/test/utilities/TestSerializer.js +0 -40
- package/lib/test/utilities/TestSerializer.js.map +0 -1
- package/lib/test/utilities/TestUtilities.d.ts +0 -212
- package/lib/test/utilities/TestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/TestUtilities.js +0 -413
- package/lib/test/utilities/TestUtilities.js.map +0 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +0 -32
- package/lib/test/utilities/UndoRedoTests.d.ts.map +0 -1
- package/lib/test/utilities/UndoRedoTests.js +0 -317
- package/lib/test/utilities/UndoRedoTests.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file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AC;QACtE,IAAI,GAAG,eAAe,CACrB,IAAI,EACJ,CAAC,OAAO,CAAC,UAAU,CAAC,EACpB,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CACvE,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC9F,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7D,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { expect } from 'chai';\nimport { TraitLabel } from '../Identifiers.js';\nimport { getChangeNodeFromViewNode } from '../SerializationUtilities.js';\nimport { ChangeNode } from '../persisted-types/index.js';\nimport { convertTreeNodesToViewNodes, RevisionView } from '../RevisionView.js';\nimport { StablePlace, StableRange } from '../ChangeTypes.js';\nimport { detachRange, insertIntoTrait } from '../EditUtilities.js';\nimport { expectDefined } from './utilities/TestCommon.js';\nimport { LeafNode, TestNode } from './utilities/TestNode.js';\nimport { refreshTestTree } from './utilities/TestUtilities.js';\n\ndescribe('RevisionView', () => {\n\tconst testTree = refreshTestTree();\n\n\tdescribe('creation from a ChangeNode', () => {\n\t\tit('ignores empty traits', () => {\n\t\t\tconst leaf = testTree.buildLeaf(testTree.generateNodeId());\n\t\t\tconst node: ChangeNode = {\n\t\t\t\ttraits: {\n\t\t\t\t\ttrait: [leaf],\n\t\t\t\t\temptyTrait: [],\n\t\t\t\t},\n\t\t\t\tdefinition: testTree.definition,\n\t\t\t\tidentifier: testTree.identifier,\n\t\t\t};\n\n\t\t\tconst view = RevisionView.fromTree(node);\n\t\t\tconst changeNode = getChangeNodeFromViewNode(view, testTree.identifier);\n\t\t\texpect(changeNode.traits.trait[0].identifier).to.equal(leaf.identifier);\n\t\t\texpect(changeNode.traits.emptyTrait).to.equal(undefined);\n\t\t});\n\t});\n\n\tit('correctly converts tree nodes', () => {\n\t\tconst viewNodes = expectDefined(\n\t\t\tconvertTreeNodesToViewNodes<TestNode>(testTree, (node) => ({\n\t\t\t\tdefinition: node.definition,\n\t\t\t\tidentifier: node.identifier,\n\t\t\t}))\n\t\t);\n\t\tlet createdRoot = false;\n\t\tlet createdLeft = false;\n\t\tlet createdRight = false;\n\t\tfor (let viewNode = viewNodes.pop(); viewNode !== undefined; viewNode = viewNodes.pop()) {\n\t\t\tswitch (viewNode.identifier) {\n\t\t\t\tcase testTree.identifier:\n\t\t\t\t\texpect(createdRoot).to.be.false;\n\t\t\t\t\texpect(viewNode.definition).to.equal(testTree.definition);\n\t\t\t\t\texpect(viewNode.traits.size).to.equal(2);\n\t\t\t\t\texpect(viewNode.traits.get(testTree.left.traitLabel)).to.deep.equal([testTree.left.identifier]);\n\t\t\t\t\texpect(viewNode.traits.get(testTree.right.traitLabel)).to.deep.equal([testTree.right.identifier]);\n\t\t\t\t\tcreatedRoot = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase testTree.left.identifier:\n\t\t\t\t\texpect(createdLeft).to.be.false;\n\t\t\t\t\texpect(viewNode.definition).to.equal(testTree.left.definition);\n\t\t\t\t\texpect(viewNode.traits.size).to.equal(0);\n\t\t\t\t\tcreatedLeft = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase testTree.right.identifier:\n\t\t\t\t\texpect(createdRight).to.be.false;\n\t\t\t\t\texpect(viewNode.definition).to.equal(testTree.right.definition);\n\t\t\t\t\texpect(viewNode.traits.size).to.equal(0);\n\t\t\t\t\tcreatedRight = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\texpect.fail('Unexpected view node ID');\n\t\t\t}\n\t\t}\n\t});\n\n\tit('correctly handles tree node conversion failure', () => {\n\t\tlet nodesConverted = 0;\n\t\tconst viewNodes = convertTreeNodesToViewNodes<TestNode>(testTree, (node) => {\n\t\t\tif (nodesConverted++ >= 2) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tdefinition: node.definition,\n\t\t\t\tidentifier: node.identifier,\n\t\t\t};\n\t\t});\n\n\t\texpect(viewNodes).to.be.undefined;\n\t});\n});\n\ndescribe('TransactionView', () => {\n\tconst testTree = refreshTestTree();\n\tconst traitLabel = 'trait' as TraitLabel;\n\n\tfunction getTree(): {\n\t\tparent: ChangeNode;\n\t\tchildA: LeafNode<ChangeNode>;\n\t\tchildB: LeafNode<ChangeNode>;\n\t} {\n\t\tconst childA = testTree.buildLeaf(testTree.generateNodeId());\n\t\tconst childB = testTree.buildLeaf(testTree.generateNodeId());\n\t\tconst parent: ChangeNode = {\n\t\t\ttraits: {\n\t\t\t\t[traitLabel]: [childA, childB],\n\t\t\t},\n\t\t\tdefinition: testTree.definition,\n\t\t\tidentifier: testTree.identifier,\n\t\t};\n\t\treturn { parent, childA, childB };\n\t}\n\n\tit('can detach a single node in a trait', () => {\n\t\tconst { parent, childA, childB } = getTree();\n\t\tconst startingView = RevisionView.fromTree(parent).openForTransaction();\n\t\tconst { view } = detachRange(startingView, StableRange.only(childA));\n\t\texpect(view.size).to.equal(3);\n\t\texpect(view.hasNode(childA.identifier)).to.be.true;\n\t\texpect(view.tryGetParentViewNode(childA.identifier)).to.be.undefined;\n\t\texpect(view.tryGetParentViewNode(childB.identifier)?.identifier).to.equal(parent.identifier);\n\t\texpect(view.getIndexInTrait(childB.identifier)).to.equal(0);\n\t});\n\n\tit('can detach an entire trait', () => {\n\t\tconst { parent, childA, childB } = getTree();\n\t\tconst startingView = RevisionView.fromTree(parent).openForTransaction();\n\t\tconst { view, detached } = detachRange(\n\t\t\tstartingView,\n\t\t\tStableRange.all({ parent: parent.identifier, label: traitLabel })\n\t\t);\n\t\texpect(detached).deep.equals([childA.identifier, childB.identifier]);\n\t\texpect(view.size).to.equal(3);\n\t\texpect(view.hasNode(childA.identifier)).to.be.true;\n\t\texpect(view.hasNode(childB.identifier)).to.be.true;\n\t\texpect(view.tryGetParentViewNode(childA.identifier)).to.be.undefined;\n\t\texpect(view.tryGetParentViewNode(childB.identifier)).to.be.undefined;\n\t});\n\n\tit('can insert a node', () => {\n\t\tconst { parent, childA, childB } = getTree();\n\t\tconst startingView = RevisionView.fromTree(parent).openForTransaction();\n\t\tconst newNode = testTree.buildLeaf(testTree.generateNodeId());\n\t\tlet view = startingView.addNodes([{ ...newNode, traits: new Map() }]);\n\t\texpect(view.size).to.equal(4);\n\t\texpect(view.hasNode(newNode.identifier)).to.be.true;\n\t\texpect(view.tryGetParentViewNode(newNode.identifier)).to.be.undefined;\n\t\tview = insertIntoTrait(\n\t\t\tview,\n\t\t\t[newNode.identifier],\n\t\t\tStablePlace.atStartOf({ parent: parent.identifier, label: traitLabel })\n\t\t);\n\t\texpect(view.tryGetParentViewNode(newNode.identifier)?.identifier).to.equal(parent.identifier);\n\t\texpect(view.getIndexInTrait(newNode.identifier)).to.equal(0);\n\t\texpect(view.getIndexInTrait(childA.identifier)).to.equal(1);\n\t\texpect(view.getIndexInTrait(childB.identifier)).to.equal(2);\n\t});\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionIdNormalizer.tests.d.ts","sourceRoot":"","sources":["../../src/test/SessionIdNormalizer.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
|
-
import { benchmark, BenchmarkType } from '@fluid-tools/benchmark';
|
|
7
|
-
import { expect } from 'chai';
|
|
8
|
-
import { chain, createWeightedGenerator, generatorFromArray, performFuzzActions, take, makeRandom, } from '@fluid-private/stochastic-test-utils';
|
|
9
|
-
import { validateAssertionError } from '@fluidframework/test-runtime-utils';
|
|
10
|
-
import { fail } from '../Common.js';
|
|
11
|
-
import { isFinalId, isLocalId } from '../id-compressor/index.js';
|
|
12
|
-
import { SessionIdNormalizer } from '../id-compressor/SessionIdNormalizer.js';
|
|
13
|
-
describe('SessionIdNormalizer', () => {
|
|
14
|
-
it('fails when adding finals with no corresponding locals', () => {
|
|
15
|
-
const normalizer = makeTestNormalizer();
|
|
16
|
-
assert.throws(() => normalizer.addFinalIds(final(0), final(1), dummy), (e) => validateAssertionError(e, 'Final IDs must be added to an existing local range.'));
|
|
17
|
-
});
|
|
18
|
-
it('fails when adding finals out of order', () => {
|
|
19
|
-
const normalizer = makeTestNormalizer();
|
|
20
|
-
normalizer.addLocalId();
|
|
21
|
-
assert.throws(() => normalizer.addFinalIds(final(1), final(0), dummy), (e) => validateAssertionError(e, 'Malformed normalization range.'));
|
|
22
|
-
});
|
|
23
|
-
it('fails when registering final blocks with no corresponding locals', () => {
|
|
24
|
-
const normalizer = makeTestNormalizer();
|
|
25
|
-
assert.throws(() => normalizer.registerFinalIdBlock(final(0), 5, dummy), (e) => validateAssertionError(e, 'Final ID block should not be registered before any locals.'));
|
|
26
|
-
normalizer.addLocalId();
|
|
27
|
-
addFinalIds(normalizer, final(0), final(0));
|
|
28
|
-
assert.throws(() => normalizer.registerFinalIdBlock(final(1), 5, dummy), (e) => validateAssertionError(e, 'Final ID block should not be registered without an existing local range.'));
|
|
29
|
-
});
|
|
30
|
-
it('fails when registering final blocks with an invalid count', () => {
|
|
31
|
-
const normalizer = makeTestNormalizer();
|
|
32
|
-
normalizer.addLocalId();
|
|
33
|
-
assert.throws(() => normalizer.registerFinalIdBlock(final(1), 0, dummy), (e) => validateAssertionError(e, 'Malformed normalization block.'));
|
|
34
|
-
assert.throws(() => normalizer.registerFinalIdBlock(final(1), -1, dummy), (e) => validateAssertionError(e, 'Malformed normalization block.'));
|
|
35
|
-
});
|
|
36
|
-
it('fails when gaps in finals do not align with a local', () => {
|
|
37
|
-
/**
|
|
38
|
-
* Locals: [-1, -2, X, -4]
|
|
39
|
-
* Finals: [ 0, 1, 2, 5]
|
|
40
|
-
* Calling `addFinalIds` with first === last === 9 results in the following:
|
|
41
|
-
* Locals: [-1, -2, X, -4, X]
|
|
42
|
-
* Finals: [ 0, 1, 2, 5, 9]
|
|
43
|
-
*
|
|
44
|
-
* ^should fail
|
|
45
|
-
*/
|
|
46
|
-
const normalizer = makeTestNormalizer();
|
|
47
|
-
normalizer.addLocalId(); // -1
|
|
48
|
-
normalizer.addLocalId(); // -2
|
|
49
|
-
addFinalIds(normalizer, final(0), final(2));
|
|
50
|
-
normalizer.addLocalId(); // -4
|
|
51
|
-
addFinalIds(normalizer, final(5), final(5));
|
|
52
|
-
assert.throws(() => addFinalIds(normalizer, final(9), final(9)), (e) => validateAssertionError(e, 'Gaps in final space must align to a local.'));
|
|
53
|
-
});
|
|
54
|
-
it('aligns outstanding locals when a block of finals is registered', () => {
|
|
55
|
-
/**
|
|
56
|
-
* Locals: [-1, -2, -3, -4]
|
|
57
|
-
* Finals: [ 0, X, X, X]
|
|
58
|
-
* Calling `registerFinalIdBlock` with first === 3, count === 10 results in the following:
|
|
59
|
-
* Locals: [-1, -2, -3, -4]
|
|
60
|
-
* Finals: [ 0, 3, 4, 5]
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
const normalizer = makeTestNormalizer();
|
|
64
|
-
const local1 = normalizer.addLocalId(); // -1
|
|
65
|
-
const local2 = normalizer.addLocalId(); // -2
|
|
66
|
-
const local3 = normalizer.addLocalId(); // -3
|
|
67
|
-
const local4 = normalizer.addLocalId(); // -4
|
|
68
|
-
normalizer.addFinalIds(final(0), final(0), dummy);
|
|
69
|
-
normalizer.registerFinalIdBlock(final(3), 10, dummy);
|
|
70
|
-
const locals = [local1, local2, local3, local4];
|
|
71
|
-
for (let i = 1; i < locals.length; i++) {
|
|
72
|
-
const expectedFinal = final(i + 2);
|
|
73
|
-
const finalObj = normalizer.getFinalId(locals[i]);
|
|
74
|
-
if (finalObj === undefined) {
|
|
75
|
-
expect.fail();
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
expect(finalObj[0]).to.equal(expectedFinal);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const local5 = normalizer.addLocalId();
|
|
82
|
-
expect(local5).to.equal(-5);
|
|
83
|
-
expect(normalizer.getFinalId(local5)).to.be.undefined;
|
|
84
|
-
});
|
|
85
|
-
it('fails to align a block of finals when there are no outstanding local IDs', () => {
|
|
86
|
-
/**
|
|
87
|
-
* Locals: [-1, X]
|
|
88
|
-
* Finals: [ 0, 1]
|
|
89
|
-
* Calling `registerFinalIdBlock` with first === 5, count === 10 should fail.
|
|
90
|
-
*/
|
|
91
|
-
const normalizer = makeTestNormalizer();
|
|
92
|
-
normalizer.addLocalId(); // -1
|
|
93
|
-
normalizer.addFinalIds(final(0), final(1), dummy);
|
|
94
|
-
assert.throws(() => normalizer.registerFinalIdBlock(final(5), 10, dummy), (e) => validateAssertionError(e, 'Final ID block should not be registered without an existing local range.'));
|
|
95
|
-
});
|
|
96
|
-
it('fails when attempting to normalize a local ID that was never registered', () => {
|
|
97
|
-
const normalizer = makeTestNormalizer();
|
|
98
|
-
assert.throws(() => normalizer.getFinalId(-1), (e) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.'));
|
|
99
|
-
const local = normalizer.addLocalId();
|
|
100
|
-
const secondLocal = (local - 1);
|
|
101
|
-
assert.throws(() => normalizer.getFinalId(secondLocal), (e) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.'));
|
|
102
|
-
addFinalIds(normalizer, final(0), final(5));
|
|
103
|
-
assert.throws(() => normalizer.getFinalId(secondLocal), (e) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.'));
|
|
104
|
-
});
|
|
105
|
-
itWithNormalizer('can normalize IDs with only local forms', (normalizer) => {
|
|
106
|
-
const local1 = normalizer.addLocalId();
|
|
107
|
-
const local2 = normalizer.addLocalId();
|
|
108
|
-
const local3 = normalizer.addLocalId();
|
|
109
|
-
const local4 = normalizer.addLocalId();
|
|
110
|
-
expect(local1).to.equal(-1);
|
|
111
|
-
expect(local2).to.equal(-2);
|
|
112
|
-
expect(local3).to.equal(-3);
|
|
113
|
-
expect(local4).to.equal(-4);
|
|
114
|
-
});
|
|
115
|
-
itWithNormalizer('can normalize IDs with trailing finals', (normalizer) => {
|
|
116
|
-
normalizer.addLocalId();
|
|
117
|
-
addFinalIds(normalizer, final(0), final(1));
|
|
118
|
-
addFinalIds(normalizer, final(2), final(3));
|
|
119
|
-
addFinalIds(normalizer, final(4), final(10));
|
|
120
|
-
});
|
|
121
|
-
itWithNormalizer('can normalize IDs with trailing locals', (normalizer) => {
|
|
122
|
-
normalizer.addLocalId();
|
|
123
|
-
addFinalIds(normalizer, final(0), final(1));
|
|
124
|
-
normalizer.addLocalId();
|
|
125
|
-
normalizer.addLocalId();
|
|
126
|
-
});
|
|
127
|
-
itWithNormalizer('can normalize IDs with a gap in final space', (normalizer) => {
|
|
128
|
-
normalizer.addLocalId();
|
|
129
|
-
normalizer.addLocalId();
|
|
130
|
-
normalizer.addLocalId();
|
|
131
|
-
addFinalIds(normalizer, final(0), final(1));
|
|
132
|
-
addFinalIds(normalizer, final(10), final(11));
|
|
133
|
-
});
|
|
134
|
-
itWithNormalizer('can normalize IDs with and without corresponding local forms', (normalizer) => {
|
|
135
|
-
normalizer.addLocalId(); // -1
|
|
136
|
-
normalizer.addLocalId(); // -2
|
|
137
|
-
normalizer.addLocalId(); // -3
|
|
138
|
-
addFinalIds(normalizer, final(0), final(3));
|
|
139
|
-
normalizer.addLocalId(); // -5
|
|
140
|
-
normalizer.addLocalId(); // -6
|
|
141
|
-
addFinalIds(normalizer, final(4), final(5));
|
|
142
|
-
normalizer.addLocalId(); // -7
|
|
143
|
-
addFinalIds(normalizer, final(8), final(9));
|
|
144
|
-
normalizer.addLocalId(); // -9
|
|
145
|
-
addFinalIds(normalizer, final(14), final(15));
|
|
146
|
-
normalizer.addLocalId(); // -11
|
|
147
|
-
normalizer.addLocalId(); // -12
|
|
148
|
-
});
|
|
149
|
-
itWithNormalizer('can get the last final ID', (normalizer) => {
|
|
150
|
-
normalizer.addLocalId(); // -1
|
|
151
|
-
normalizer.addLocalId(); // -2
|
|
152
|
-
normalizer.addLocalId(); // -3
|
|
153
|
-
normalizer.addLocalId(); // -4
|
|
154
|
-
expect(normalizer.getLastFinalId()).to.be.undefined;
|
|
155
|
-
addFinalIds(normalizer, final(0), final(1));
|
|
156
|
-
expect(normalizer.getLastFinalId()).to.equal(1);
|
|
157
|
-
addFinalIds(normalizer, final(2), final(2));
|
|
158
|
-
expect(normalizer.getLastFinalId()).to.equal(2);
|
|
159
|
-
addFinalIds(normalizer, final(10), final(15));
|
|
160
|
-
expect(normalizer.getLastFinalId()).to.equal(15);
|
|
161
|
-
});
|
|
162
|
-
itWithNormalizer('can normalize IDs after fuzzed inputs', (normalizer) => {
|
|
163
|
-
fuzzNormalizer(normalizer, 1000, 42);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
describe('SessionIdNormalizer Perf', () => {
|
|
167
|
-
const choiceCount = 1000;
|
|
168
|
-
const type = BenchmarkType.Measurement;
|
|
169
|
-
let normalizer;
|
|
170
|
-
let rand;
|
|
171
|
-
let ids;
|
|
172
|
-
let finals;
|
|
173
|
-
let locals;
|
|
174
|
-
let localChoices;
|
|
175
|
-
let finalChoices;
|
|
176
|
-
const before = () => {
|
|
177
|
-
normalizer = new SessionIdNormalizer();
|
|
178
|
-
rand = fuzzNormalizer(normalizer, 10000, 3.14);
|
|
179
|
-
ids = [...normalizer];
|
|
180
|
-
locals = ids.filter((id) => isLocalId(id));
|
|
181
|
-
finals = ids.filter((id) => isFinalId(id));
|
|
182
|
-
localChoices = [];
|
|
183
|
-
finalChoices = [];
|
|
184
|
-
for (let i = 0; i < choiceCount; i++) {
|
|
185
|
-
localChoices.push(rand.pick(locals));
|
|
186
|
-
finalChoices.push(rand.pick(finals));
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
let localChoice = 0;
|
|
190
|
-
benchmark({
|
|
191
|
-
type,
|
|
192
|
-
title: `normalize a local ID to a final ID`,
|
|
193
|
-
before,
|
|
194
|
-
benchmarkFn: () => {
|
|
195
|
-
normalizer.getFinalId(localChoices[localChoice++ % localChoices.length]);
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
let finalChoice = 0;
|
|
199
|
-
benchmark({
|
|
200
|
-
type,
|
|
201
|
-
title: `normalize a final ID to session space`,
|
|
202
|
-
before,
|
|
203
|
-
benchmarkFn: () => {
|
|
204
|
-
normalizer.getSessionSpaceId(finalChoices[finalChoice++ % finalChoices.length]);
|
|
205
|
-
},
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
function itWithNormalizer(title, itFn) {
|
|
209
|
-
it(title, () => {
|
|
210
|
-
const locals = [];
|
|
211
|
-
const finals = [];
|
|
212
|
-
const normalizer = makeNormalizerProxy(makeTestNormalizer(), locals, finals);
|
|
213
|
-
itFn(normalizer);
|
|
214
|
-
const allIds = [...normalizer];
|
|
215
|
-
let prevLocal;
|
|
216
|
-
let prevFinal;
|
|
217
|
-
for (let i = 0; i < locals.length && i < finals.length; i++) {
|
|
218
|
-
const localExpected = locals[i];
|
|
219
|
-
const finalExpected = finals[i];
|
|
220
|
-
// local can be undefined in the case of eager final
|
|
221
|
-
// final can be undefined in the case of trailing locals with no cluster
|
|
222
|
-
// both should never occur
|
|
223
|
-
assert((localExpected !== undefined && isLocalId(localExpected)) ||
|
|
224
|
-
(finalExpected !== undefined && isFinalId(finalExpected)));
|
|
225
|
-
if (prevFinal !== undefined && finalExpected !== undefined) {
|
|
226
|
-
assert(finalExpected > prevFinal);
|
|
227
|
-
}
|
|
228
|
-
if (prevLocal !== undefined && localExpected !== undefined) {
|
|
229
|
-
assert(localExpected < prevLocal);
|
|
230
|
-
}
|
|
231
|
-
prevLocal = localExpected;
|
|
232
|
-
prevFinal = finalExpected;
|
|
233
|
-
const sessionIdExpected = localExpected ?? finalExpected;
|
|
234
|
-
const sessionIdActualAll = allIds[i];
|
|
235
|
-
const sessionIdActualNormalized = finalExpected === undefined ? localExpected : normalizer.getSessionSpaceId(finalExpected);
|
|
236
|
-
if (finalExpected !== undefined) {
|
|
237
|
-
const creationIndex = normalizer.getCreationIndex(finalExpected);
|
|
238
|
-
expect(creationIndex).to.equal(i);
|
|
239
|
-
}
|
|
240
|
-
const idByIndex = normalizer.getIdByCreationIndex(i);
|
|
241
|
-
expect(idByIndex).to.equal(localExpected ?? finalExpected);
|
|
242
|
-
if (localExpected !== undefined) {
|
|
243
|
-
const normalized = normalizer.getFinalId(localExpected);
|
|
244
|
-
if (normalized === undefined) {
|
|
245
|
-
expect(finalExpected).to.be.undefined;
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
const [opIdActualNormalized] = normalized;
|
|
249
|
-
expect(opIdActualNormalized).to.equal(finalExpected);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
expect(sessionIdExpected).to.equal(sessionIdActualAll);
|
|
253
|
-
expect(sessionIdActualAll).to.equal(sessionIdActualNormalized);
|
|
254
|
-
}
|
|
255
|
-
expect(normalizer.getLastFinalId()).to.equal(finals[finals.length - 1]);
|
|
256
|
-
const roundtripped = SessionIdNormalizer.deserialize(normalizer.serialize(), () => undefined);
|
|
257
|
-
expect(roundtripped.equals(normalizer)).to.be.true;
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
function addFinalIds(normalizer, firstFinal, lastFinal) {
|
|
261
|
-
normalizer.addFinalIds(firstFinal, lastFinal, dummy);
|
|
262
|
-
}
|
|
263
|
-
function makeNormalizerProxy(normalizer, locals, finals) {
|
|
264
|
-
return new Proxy(normalizer, {
|
|
265
|
-
get(target, property) {
|
|
266
|
-
if (typeof target[property] === 'function') {
|
|
267
|
-
switch (property) {
|
|
268
|
-
case 'addLocalId': {
|
|
269
|
-
return new Proxy(target[property], {
|
|
270
|
-
apply: (func, thisArg, argumentsList) => {
|
|
271
|
-
const local = Reflect.apply(func, thisArg, argumentsList);
|
|
272
|
-
if (locals.length > 0) {
|
|
273
|
-
for (let i = (locals[locals.length - 1] ?? fail()) - 1; i > local; i--) {
|
|
274
|
-
locals.push(undefined);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
locals.push(local);
|
|
278
|
-
return local;
|
|
279
|
-
},
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
case 'addFinalIds': {
|
|
283
|
-
return new Proxy(target[property], {
|
|
284
|
-
apply: (func, thisArg, argumentsList) => {
|
|
285
|
-
const firstFinal = argumentsList[0];
|
|
286
|
-
const lastFinal = argumentsList[1];
|
|
287
|
-
for (let i = firstFinal; i <= lastFinal; i++) {
|
|
288
|
-
finals.push(i);
|
|
289
|
-
}
|
|
290
|
-
return Reflect.apply(func, thisArg, argumentsList);
|
|
291
|
-
},
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
case 'registerFinalIdBlock': {
|
|
295
|
-
return new Proxy(target[property], {
|
|
296
|
-
apply: (func, thisArg, argumentsList) => {
|
|
297
|
-
const firstFinal = argumentsList[0];
|
|
298
|
-
const count = argumentsList[1];
|
|
299
|
-
const usedFinals = Math.max(0, Math.min(locals.length - finals.length, count));
|
|
300
|
-
for (let i = firstFinal; i < usedFinals; i++) {
|
|
301
|
-
finals.push(i);
|
|
302
|
-
}
|
|
303
|
-
return Reflect.apply(func, thisArg, argumentsList);
|
|
304
|
-
},
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
// No default
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
return Reflect.get(target, property);
|
|
311
|
-
},
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
const dummy = undefined;
|
|
315
|
-
function final(num) {
|
|
316
|
-
assert(num >= 0);
|
|
317
|
-
return num;
|
|
318
|
-
}
|
|
319
|
-
function makeTestNormalizer() {
|
|
320
|
-
return new SessionIdNormalizer(true);
|
|
321
|
-
}
|
|
322
|
-
function makeOpGenerator(numOperations) {
|
|
323
|
-
function addLocalIdGenerator(state) {
|
|
324
|
-
const { locals, finals, random } = state;
|
|
325
|
-
state.currentLocal =
|
|
326
|
-
locals.length < finals.length && random.bool()
|
|
327
|
-
? -locals.length - (finals.length - locals.length) - 1
|
|
328
|
-
: -locals.length - 1;
|
|
329
|
-
state.prevWasLocal = true;
|
|
330
|
-
return { type: 'addLocalId' };
|
|
331
|
-
}
|
|
332
|
-
function addFinalIdsGenerator(state) {
|
|
333
|
-
const { locals, finals, random } = state;
|
|
334
|
-
if (state.prevWasLocal && locals.length > finals.length && random.integer(1, 3) === 3) {
|
|
335
|
-
state.currentFinal += random.integer(1, 4);
|
|
336
|
-
}
|
|
337
|
-
const lastFinal = state.currentFinal + random.integer(0, 10);
|
|
338
|
-
const addFinal = {
|
|
339
|
-
type: 'addFinalIds',
|
|
340
|
-
first: final(state.currentFinal),
|
|
341
|
-
last: final(lastFinal),
|
|
342
|
-
};
|
|
343
|
-
state.currentFinal = lastFinal + 1;
|
|
344
|
-
state.prevWasLocal = false;
|
|
345
|
-
return addFinal;
|
|
346
|
-
}
|
|
347
|
-
return chain(generatorFromArray([{ type: 'addLocalId' }]), take(numOperations - 1, createWeightedGenerator([
|
|
348
|
-
[addLocalIdGenerator, 8],
|
|
349
|
-
[addFinalIdsGenerator, 2],
|
|
350
|
-
])));
|
|
351
|
-
}
|
|
352
|
-
function fuzzNormalizer(normalizerToFuzz, numOperations, seed) {
|
|
353
|
-
const locals = [];
|
|
354
|
-
const finals = [];
|
|
355
|
-
const normalizer = makeNormalizerProxy(normalizerToFuzz, locals, finals);
|
|
356
|
-
const initialState = {
|
|
357
|
-
random: makeRandom(seed),
|
|
358
|
-
currentLocal: -1,
|
|
359
|
-
currentFinal: 0,
|
|
360
|
-
prevWasLocal: false,
|
|
361
|
-
normalizer,
|
|
362
|
-
locals,
|
|
363
|
-
finals,
|
|
364
|
-
};
|
|
365
|
-
performFuzzActions(makeOpGenerator(numOperations), {
|
|
366
|
-
addLocalId: (state) => {
|
|
367
|
-
state.normalizer.addLocalId();
|
|
368
|
-
return state;
|
|
369
|
-
},
|
|
370
|
-
addFinalIds: (state, { first, last }) => {
|
|
371
|
-
state.normalizer.addFinalIds(first, last, dummy);
|
|
372
|
-
return state;
|
|
373
|
-
},
|
|
374
|
-
}, initialState);
|
|
375
|
-
return initialState.random;
|
|
376
|
-
}
|
|
377
|
-
//# sourceMappingURL=SessionIdNormalizer.tests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionIdNormalizer.tests.js","sourceRoot":"","sources":["../../src/test/SessionIdNormalizer.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAEN,KAAK,EACL,uBAAuB,EAEvB,kBAAkB,EAElB,kBAAkB,EAClB,IAAI,EACJ,UAAU,GACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE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;YACjD,OAAO,KAAK,CAAC;QACd,CAAC;KACD,EACD,YAAY,CACZ,CAAC;IACF,OAAO,YAAY,CAAC,MAAM,CAAC;AAC5B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from 'assert';\nimport { benchmark, BenchmarkType } from '@fluid-tools/benchmark';\nimport { expect } from 'chai';\nimport {\n\tBaseFuzzTestState,\n\tchain,\n\tcreateWeightedGenerator,\n\tGenerator,\n\tgeneratorFromArray,\n\tIRandom,\n\tperformFuzzActions,\n\ttake,\n\tmakeRandom,\n} from '@fluid-private/stochastic-test-utils';\nimport { validateAssertionError } from '@fluidframework/test-runtime-utils';\nimport { fail } from '../Common.js';\nimport { isFinalId, isLocalId } from '../id-compressor/index.js';\nimport { SessionIdNormalizer } from '../id-compressor/SessionIdNormalizer.js';\nimport { FinalCompressedId, LocalCompressedId, SessionSpaceCompressedId } from '../Identifiers.js';\n\ndescribe('SessionIdNormalizer', () => {\n\tit('fails when adding finals with no corresponding locals', () => {\n\t\tconst normalizer = makeTestNormalizer();\n\t\tassert.throws(\n\t\t\t() => normalizer.addFinalIds(final(0), final(1), dummy),\n\t\t\t(e: Error) => validateAssertionError(e, 'Final IDs must be added to an existing local range.')\n\t\t);\n\t});\n\n\tit('fails when adding finals out of order', () => {\n\t\tconst normalizer = makeTestNormalizer();\n\t\tnormalizer.addLocalId();\n\t\tassert.throws(\n\t\t\t() => normalizer.addFinalIds(final(1), final(0), dummy),\n\t\t\t(e: Error) => validateAssertionError(e, 'Malformed normalization range.')\n\t\t);\n\t});\n\n\tit('fails when registering final blocks with no corresponding locals', () => {\n\t\tconst normalizer = makeTestNormalizer();\n\t\tassert.throws(\n\t\t\t() => normalizer.registerFinalIdBlock(final(0), 5, dummy),\n\t\t\t(e: Error) => validateAssertionError(e, 'Final ID block should not be registered before any locals.')\n\t\t);\n\t\tnormalizer.addLocalId();\n\t\taddFinalIds(normalizer, final(0), final(0));\n\t\tassert.throws(\n\t\t\t() => normalizer.registerFinalIdBlock(final(1), 5, dummy),\n\t\t\t(e: Error) =>\n\t\t\t\tvalidateAssertionError(e, 'Final ID block should not be registered without an existing local range.')\n\t\t);\n\t});\n\n\tit('fails when registering final blocks with an invalid count', () => {\n\t\tconst normalizer = makeTestNormalizer();\n\t\tnormalizer.addLocalId();\n\t\tassert.throws(\n\t\t\t() => normalizer.registerFinalIdBlock(final(1), 0, dummy),\n\t\t\t(e: Error) => validateAssertionError(e, 'Malformed normalization block.')\n\t\t);\n\t\tassert.throws(\n\t\t\t() => normalizer.registerFinalIdBlock(final(1), -1, dummy),\n\t\t\t(e: Error) => validateAssertionError(e, 'Malformed normalization block.')\n\t\t);\n\t});\n\n\tit('fails when gaps in finals do not align with a local', () => {\n\t\t/**\n\t\t * Locals: [-1, -2, X, -4]\n\t\t * Finals: [ 0, 1, 2, 5]\n\t\t * Calling `addFinalIds` with first === last === 9 results in the following:\n\t\t * Locals: [-1, -2, X, -4, X]\n\t\t * Finals: [ 0, 1, 2, 5, 9]\n\t\t *\n\t\t * ^should fail\n\t\t */\n\t\tconst normalizer = makeTestNormalizer();\n\t\tnormalizer.addLocalId(); // -1\n\t\tnormalizer.addLocalId(); // -2\n\t\taddFinalIds(normalizer, final(0), final(2));\n\t\tnormalizer.addLocalId(); // -4\n\t\taddFinalIds(normalizer, final(5), final(5));\n\t\tassert.throws(\n\t\t\t() => addFinalIds(normalizer, final(9), final(9)),\n\t\t\t(e: Error) => validateAssertionError(e, 'Gaps in final space must align to a local.')\n\t\t);\n\t});\n\n\tit('aligns outstanding locals when a block of finals is registered', () => {\n\t\t/**\n\t\t * Locals: [-1, -2, -3, -4]\n\t\t * Finals: [ 0, X, X, X]\n\t\t * Calling `registerFinalIdBlock` with first === 3, count === 10 results in the following:\n\t\t * Locals: [-1, -2, -3, -4]\n\t\t * Finals: [ 0, 3, 4, 5]\n\t\t *\n\t\t */\n\t\tconst normalizer = makeTestNormalizer();\n\t\tconst local1 = normalizer.addLocalId(); // -1\n\t\tconst local2 = normalizer.addLocalId(); // -2\n\t\tconst local3 = normalizer.addLocalId(); // -3\n\t\tconst local4 = normalizer.addLocalId(); // -4\n\t\tnormalizer.addFinalIds(final(0), final(0), dummy);\n\n\t\tnormalizer.registerFinalIdBlock(final(3), 10, dummy);\n\t\tconst locals = [local1, local2, local3, local4];\n\t\tfor (let i = 1; i < locals.length; i++) {\n\t\t\tconst expectedFinal = final(i + 2);\n\t\t\tconst finalObj = normalizer.getFinalId(locals[i]);\n\t\t\tif (finalObj === undefined) {\n\t\t\t\texpect.fail();\n\t\t\t} else {\n\t\t\t\texpect(finalObj[0]).to.equal(expectedFinal);\n\t\t\t}\n\t\t}\n\n\t\tconst local5 = normalizer.addLocalId();\n\t\texpect(local5).to.equal(-5);\n\t\texpect(normalizer.getFinalId(local5)).to.be.undefined;\n\t});\n\n\tit('fails to align a block of finals when there are no outstanding local IDs', () => {\n\t\t/**\n\t\t * Locals: [-1, X]\n\t\t * Finals: [ 0, 1]\n\t\t * Calling `registerFinalIdBlock` with first === 5, count === 10 should fail.\n\t\t */\n\t\tconst normalizer = makeTestNormalizer();\n\t\tnormalizer.addLocalId(); // -1\n\t\tnormalizer.addFinalIds(final(0), final(1), dummy);\n\n\t\tassert.throws(\n\t\t\t() => normalizer.registerFinalIdBlock(final(5), 10, dummy),\n\t\t\t(e: Error) =>\n\t\t\t\tvalidateAssertionError(e, 'Final ID block should not be registered without an existing local range.')\n\t\t);\n\t});\n\n\tit('fails when attempting to normalize a local ID that was never registered', () => {\n\t\tconst normalizer = makeTestNormalizer();\n\t\tassert.throws(\n\t\t\t() => normalizer.getFinalId(-1 as LocalCompressedId),\n\t\t\t(e: Error) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.')\n\t\t);\n\t\tconst local = normalizer.addLocalId();\n\t\tconst secondLocal = (local - 1) as LocalCompressedId;\n\t\tassert.throws(\n\t\t\t() => normalizer.getFinalId(secondLocal),\n\t\t\t(e: Error) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.')\n\t\t);\n\t\taddFinalIds(normalizer, final(0), final(5));\n\t\tassert.throws(\n\t\t\t() => normalizer.getFinalId(secondLocal),\n\t\t\t(e: Error) => validateAssertionError(e, 'Local ID was never recorded with this normalizer.')\n\t\t);\n\t});\n\n\titWithNormalizer('can normalize IDs with only local forms', (normalizer) => {\n\t\tconst local1 = normalizer.addLocalId();\n\t\tconst local2 = normalizer.addLocalId();\n\t\tconst local3 = normalizer.addLocalId();\n\t\tconst local4 = normalizer.addLocalId();\n\t\texpect(local1).to.equal(-1);\n\t\texpect(local2).to.equal(-2);\n\t\texpect(local3).to.equal(-3);\n\t\texpect(local4).to.equal(-4);\n\t});\n\n\titWithNormalizer('can normalize IDs with trailing finals', (normalizer) => {\n\t\tnormalizer.addLocalId();\n\t\taddFinalIds(normalizer, final(0), final(1));\n\t\taddFinalIds(normalizer, final(2), final(3));\n\t\taddFinalIds(normalizer, final(4), final(10));\n\t});\n\n\titWithNormalizer('can normalize IDs with trailing locals', (normalizer) => {\n\t\tnormalizer.addLocalId();\n\t\taddFinalIds(normalizer, final(0), final(1));\n\t\tnormalizer.addLocalId();\n\t\tnormalizer.addLocalId();\n\t});\n\n\titWithNormalizer('can normalize IDs with a gap in final space', (normalizer) => {\n\t\tnormalizer.addLocalId();\n\t\tnormalizer.addLocalId();\n\t\tnormalizer.addLocalId();\n\t\taddFinalIds(normalizer, final(0), final(1));\n\t\taddFinalIds(normalizer, final(10), final(11));\n\t});\n\n\titWithNormalizer('can normalize IDs with and without corresponding local forms', (normalizer) => {\n\t\tnormalizer.addLocalId(); // -1\n\t\tnormalizer.addLocalId(); // -2\n\t\tnormalizer.addLocalId(); // -3\n\t\taddFinalIds(normalizer, final(0), final(3));\n\t\tnormalizer.addLocalId(); // -5\n\t\tnormalizer.addLocalId(); // -6\n\t\taddFinalIds(normalizer, final(4), final(5));\n\t\tnormalizer.addLocalId(); // -7\n\t\taddFinalIds(normalizer, final(8), final(9));\n\t\tnormalizer.addLocalId(); // -9\n\t\taddFinalIds(normalizer, final(14), final(15));\n\t\tnormalizer.addLocalId(); // -11\n\t\tnormalizer.addLocalId(); // -12\n\t});\n\n\titWithNormalizer('can get the last final ID', (normalizer) => {\n\t\tnormalizer.addLocalId(); // -1\n\t\tnormalizer.addLocalId(); // -2\n\t\tnormalizer.addLocalId(); // -3\n\t\tnormalizer.addLocalId(); // -4\n\t\texpect(normalizer.getLastFinalId()).to.be.undefined;\n\t\taddFinalIds(normalizer, final(0), final(1));\n\t\texpect(normalizer.getLastFinalId()).to.equal(1);\n\t\taddFinalIds(normalizer, final(2), final(2));\n\t\texpect(normalizer.getLastFinalId()).to.equal(2);\n\t\taddFinalIds(normalizer, final(10), final(15));\n\t\texpect(normalizer.getLastFinalId()).to.equal(15);\n\t});\n\n\titWithNormalizer('can normalize IDs after fuzzed inputs', (normalizer) => {\n\t\tfuzzNormalizer(normalizer, 1000, 42);\n\t});\n});\n\ndescribe('SessionIdNormalizer Perf', () => {\n\tconst choiceCount = 1000;\n\tconst type = BenchmarkType.Measurement;\n\tlet normalizer: SessionIdNormalizer<DummyRange>;\n\tlet rand: IRandom;\n\tlet ids: SessionSpaceCompressedId[];\n\tlet finals: FinalCompressedId[];\n\tlet locals: LocalCompressedId[];\n\tlet localChoices: LocalCompressedId[];\n\tlet finalChoices: FinalCompressedId[];\n\tconst before = () => {\n\t\tnormalizer = new SessionIdNormalizer();\n\t\trand = fuzzNormalizer(normalizer, 10000, 3.14);\n\t\tids = [...normalizer];\n\t\tlocals = ids.filter<LocalCompressedId>((id): id is LocalCompressedId => isLocalId(id));\n\t\tfinals = ids.filter((id) => isFinalId(id)) as FinalCompressedId[];\n\t\tlocalChoices = [];\n\t\tfinalChoices = [];\n\t\tfor (let i = 0; i < choiceCount; i++) {\n\t\t\tlocalChoices.push(rand.pick(locals));\n\t\t\tfinalChoices.push(rand.pick(finals));\n\t\t}\n\t};\n\n\tlet localChoice = 0;\n\tbenchmark({\n\t\ttype,\n\t\ttitle: `normalize a local ID to a final ID`,\n\t\tbefore,\n\t\tbenchmarkFn: () => {\n\t\t\tnormalizer.getFinalId(localChoices[localChoice++ % localChoices.length]);\n\t\t},\n\t});\n\n\tlet finalChoice = 0;\n\tbenchmark({\n\t\ttype,\n\t\ttitle: `normalize a final ID to session space`,\n\t\tbefore,\n\t\tbenchmarkFn: () => {\n\t\t\tnormalizer.getSessionSpaceId(finalChoices[finalChoice++ % finalChoices.length]);\n\t\t},\n\t});\n});\n\nfunction itWithNormalizer(title: string, itFn: (normalizer: SessionIdNormalizer<DummyRange>) => void): void {\n\tit(title, () => {\n\t\tconst locals: (LocalCompressedId | undefined)[] = [];\n\t\tconst finals: (FinalCompressedId | undefined)[] = [];\n\t\tconst normalizer: SessionIdNormalizer<DummyRange> = makeNormalizerProxy(makeTestNormalizer(), locals, finals);\n\n\t\titFn(normalizer);\n\t\tconst allIds = [...normalizer];\n\t\tlet prevLocal: LocalCompressedId | undefined;\n\t\tlet prevFinal: FinalCompressedId | undefined;\n\t\tfor (let i = 0; i < locals.length && i < finals.length; i++) {\n\t\t\tconst localExpected = locals[i];\n\t\t\tconst finalExpected = finals[i];\n\t\t\t// local can be undefined in the case of eager final\n\t\t\t// final can be undefined in the case of trailing locals with no cluster\n\t\t\t// both should never occur\n\t\t\tassert(\n\t\t\t\t(localExpected !== undefined && isLocalId(localExpected)) ||\n\t\t\t\t\t(finalExpected !== undefined && isFinalId(finalExpected))\n\t\t\t);\n\t\t\tif (prevFinal !== undefined && finalExpected !== undefined) {\n\t\t\t\tassert(finalExpected > prevFinal);\n\t\t\t}\n\t\t\tif (prevLocal !== undefined && localExpected !== undefined) {\n\t\t\t\tassert(localExpected < prevLocal);\n\t\t\t}\n\t\t\tprevLocal = localExpected;\n\t\t\tprevFinal = finalExpected;\n\n\t\t\tconst sessionIdExpected = localExpected ?? finalExpected;\n\t\t\tconst sessionIdActualAll = allIds[i];\n\t\t\tconst sessionIdActualNormalized =\n\t\t\t\tfinalExpected === undefined ? localExpected : normalizer.getSessionSpaceId(finalExpected);\n\n\t\t\tif (finalExpected !== undefined) {\n\t\t\t\tconst creationIndex = normalizer.getCreationIndex(finalExpected);\n\t\t\t\texpect(creationIndex).to.equal(i);\n\t\t\t}\n\n\t\t\tconst idByIndex = normalizer.getIdByCreationIndex(i);\n\t\t\texpect(idByIndex).to.equal(localExpected ?? finalExpected);\n\n\t\t\tif (localExpected !== undefined) {\n\t\t\t\tconst normalized = normalizer.getFinalId(localExpected);\n\t\t\t\tif (normalized === undefined) {\n\t\t\t\t\texpect(finalExpected).to.be.undefined;\n\t\t\t\t} else {\n\t\t\t\t\tconst [opIdActualNormalized] = normalized;\n\t\t\t\t\texpect(opIdActualNormalized).to.equal(finalExpected);\n\t\t\t\t}\n\t\t\t}\n\t\t\texpect(sessionIdExpected).to.equal(sessionIdActualAll);\n\t\t\texpect(sessionIdActualAll).to.equal(sessionIdActualNormalized);\n\t\t}\n\t\texpect(normalizer.getLastFinalId()).to.equal(finals[finals.length - 1]);\n\t\tconst roundtripped = SessionIdNormalizer.deserialize(normalizer.serialize(), () => undefined);\n\t\texpect(roundtripped.equals(normalizer)).to.be.true;\n\t});\n}\n\nfunction addFinalIds(\n\tnormalizer: SessionIdNormalizer<DummyRange>,\n\tfirstFinal: FinalCompressedId,\n\tlastFinal: FinalCompressedId\n): void {\n\tnormalizer.addFinalIds(firstFinal, lastFinal, dummy);\n}\n\nfunction makeNormalizerProxy(\n\tnormalizer: SessionIdNormalizer<DummyRange>,\n\tlocals: (LocalCompressedId | undefined)[],\n\tfinals: (FinalCompressedId | undefined)[]\n): SessionIdNormalizer<DummyRange> {\n\treturn new Proxy<SessionIdNormalizer<DummyRange>>(normalizer, {\n\t\tget(target, property: keyof SessionIdNormalizer<DummyRange>) {\n\t\t\tif (typeof target[property] === 'function') {\n\t\t\t\tswitch (property) {\n\t\t\t\t\tcase 'addLocalId': {\n\t\t\t\t\t\treturn new Proxy(target[property], {\n\t\t\t\t\t\t\tapply: (func, thisArg, argumentsList) => {\n\t\t\t\t\t\t\t\tconst local = Reflect.apply(func, thisArg, argumentsList);\n\t\t\t\t\t\t\t\tif (locals.length > 0) {\n\t\t\t\t\t\t\t\t\tfor (let i = (locals[locals.length - 1] ?? fail()) - 1; i > local; i--) {\n\t\t\t\t\t\t\t\t\t\tlocals.push(undefined);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlocals.push(local);\n\t\t\t\t\t\t\t\treturn local;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcase 'addFinalIds': {\n\t\t\t\t\t\treturn new Proxy(target[property], {\n\t\t\t\t\t\t\tapply: (func, thisArg, argumentsList) => {\n\t\t\t\t\t\t\t\tconst firstFinal: FinalCompressedId = argumentsList[0];\n\t\t\t\t\t\t\t\tconst lastFinal: FinalCompressedId = argumentsList[1];\n\t\t\t\t\t\t\t\tfor (let i = firstFinal; i <= lastFinal; i++) {\n\t\t\t\t\t\t\t\t\tfinals.push(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn Reflect.apply(func, thisArg, argumentsList);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcase 'registerFinalIdBlock': {\n\t\t\t\t\t\treturn new Proxy(target[property], {\n\t\t\t\t\t\t\tapply: (func, thisArg, argumentsList) => {\n\t\t\t\t\t\t\t\tconst firstFinal: FinalCompressedId = argumentsList[0];\n\t\t\t\t\t\t\t\tconst count: FinalCompressedId = argumentsList[1];\n\t\t\t\t\t\t\t\tconst usedFinals = Math.max(0, Math.min(locals.length - finals.length, count));\n\t\t\t\t\t\t\t\tfor (let i = firstFinal; i < usedFinals; i++) {\n\t\t\t\t\t\t\t\t\tfinals.push(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn Reflect.apply(func, thisArg, argumentsList);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t// No default\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Reflect.get(target, property);\n\t\t},\n\t});\n}\n\ntype DummyRange = undefined;\nconst dummy: DummyRange = undefined;\n\nfunction final(num: number): FinalCompressedId {\n\tassert(num >= 0);\n\treturn num as FinalCompressedId;\n}\n\nfunction makeTestNormalizer(): SessionIdNormalizer<DummyRange> {\n\treturn new SessionIdNormalizer<DummyRange>(true);\n}\n\ninterface AddLocalId {\n\ttype: 'addLocalId';\n}\n\ninterface AddFinalIds {\n\ttype: 'addFinalIds';\n\tfirst: FinalCompressedId;\n\tlast: FinalCompressedId;\n}\n\ntype Operation = AddLocalId | AddFinalIds;\n\ninterface FuzzTestState extends BaseFuzzTestState {\n\tnormalizer: SessionIdNormalizer<DummyRange>;\n\tprevWasLocal: boolean;\n\tcurrentLocal: number;\n\tcurrentFinal: number;\n\tlocals: (LocalCompressedId | undefined)[];\n\tfinals: (FinalCompressedId | undefined)[];\n}\n\nfunction makeOpGenerator(numOperations: number): Generator<Operation, FuzzTestState> {\n\tfunction addLocalIdGenerator(state: FuzzTestState): AddLocalId {\n\t\tconst { locals, finals, random } = state;\n\t\tstate.currentLocal =\n\t\t\tlocals.length < finals.length && random.bool()\n\t\t\t\t? -locals.length - (finals.length - locals.length) - 1\n\t\t\t\t: -locals.length - 1;\n\t\tstate.prevWasLocal = true;\n\t\treturn { type: 'addLocalId' };\n\t}\n\n\tfunction addFinalIdsGenerator(state: FuzzTestState): AddFinalIds {\n\t\tconst { locals, finals, random } = state;\n\t\tif (state.prevWasLocal && locals.length > finals.length && random.integer(1, 3) === 3) {\n\t\t\tstate.currentFinal += random.integer(1, 4);\n\t\t}\n\t\tconst lastFinal = state.currentFinal + random.integer(0, 10);\n\t\tconst addFinal: AddFinalIds = {\n\t\t\ttype: 'addFinalIds',\n\t\t\tfirst: final(state.currentFinal),\n\t\t\tlast: final(lastFinal),\n\t\t};\n\t\tstate.currentFinal = lastFinal + 1;\n\t\tstate.prevWasLocal = false;\n\t\treturn addFinal;\n\t}\n\n\treturn chain(\n\t\tgeneratorFromArray([{ type: 'addLocalId' }]),\n\t\ttake(\n\t\t\tnumOperations - 1,\n\t\t\tcreateWeightedGenerator<Operation, FuzzTestState>([\n\t\t\t\t[addLocalIdGenerator, 8],\n\t\t\t\t[addFinalIdsGenerator, 2],\n\t\t\t])\n\t\t)\n\t);\n}\n\nfunction fuzzNormalizer(\n\tnormalizerToFuzz: SessionIdNormalizer<DummyRange>,\n\tnumOperations: number,\n\tseed: number\n): IRandom {\n\tconst locals: (LocalCompressedId | undefined)[] = [];\n\tconst finals: (FinalCompressedId | undefined)[] = [];\n\tconst normalizer: SessionIdNormalizer<DummyRange> = makeNormalizerProxy(normalizerToFuzz, locals, finals);\n\n\tconst initialState: FuzzTestState = {\n\t\trandom: makeRandom(seed),\n\t\tcurrentLocal: -1,\n\t\tcurrentFinal: 0,\n\t\tprevWasLocal: false,\n\t\tnormalizer,\n\t\tlocals,\n\t\tfinals,\n\t};\n\n\tperformFuzzActions(\n\t\tmakeOpGenerator(numOperations),\n\t\t{\n\t\t\taddLocalId: (state) => {\n\t\t\t\tstate.normalizer.addLocalId();\n\t\t\t\treturn state;\n\t\t\t},\n\t\t\taddFinalIds: (state, { first, last }) => {\n\t\t\t\tstate.normalizer.addFinalIds(first, last, dummy);\n\t\t\t\treturn state;\n\t\t\t},\n\t\t},\n\t\tinitialState\n\t);\n\treturn initialState.random;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.fuzz.tests.d.ts","sourceRoot":"","sources":["../../src/test/SharedTree.fuzz.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { runSharedTreeFuzzTests } from './fuzz/SharedTreeFuzzTests.js';
|
|
6
|
-
describe('SharedTree', () => {
|
|
7
|
-
runSharedTreeFuzzTests('Fuzz tests with local server');
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=SharedTree.fuzz.tests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.fuzz.tests.js","sourceRoot":"","sources":["../../src/test/SharedTree.fuzz.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,sBAAsB,CAAC,8BAA8B,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { runSharedTreeFuzzTests } from './fuzz/SharedTreeFuzzTests.js';\n\ndescribe('SharedTree', () => {\n\trunSharedTreeFuzzTests('Fuzz tests with local server');\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.perf.tests.d.ts","sourceRoot":"","sources":["../../src/test/SharedTree.perf.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
|
-
import { benchmark, BenchmarkType } from '@fluid-tools/benchmark';
|
|
7
|
-
import { runSummaryLoadPerfTests } from './utilities/SummaryLoadPerfTests.js';
|
|
8
|
-
import { createStableEdits, setUpTestSharedTree } from './utilities/TestUtilities.js';
|
|
9
|
-
describe('SharedTree Perf', () => {
|
|
10
|
-
let tree;
|
|
11
|
-
let containerRuntimeFactory;
|
|
12
|
-
for (const count of [1, 1000]) {
|
|
13
|
-
benchmark({
|
|
14
|
-
type: BenchmarkType.Measurement,
|
|
15
|
-
title: `get currentView with ${count} sequenced edit(s)`,
|
|
16
|
-
before: () => {
|
|
17
|
-
({ tree, containerRuntimeFactory } = setUpTestSharedTree({ localMode: false }));
|
|
18
|
-
const edits = createStableEdits(count, tree);
|
|
19
|
-
for (let i = 0; i < count; i++) {
|
|
20
|
-
tree.applyEditInternal(edits[i].changes);
|
|
21
|
-
}
|
|
22
|
-
containerRuntimeFactory.processAllMessages();
|
|
23
|
-
const editLog = tree.edits;
|
|
24
|
-
assert(editLog.numberOfSequencedEdits === count);
|
|
25
|
-
assert(editLog.numberOfLocalEdits === 0);
|
|
26
|
-
},
|
|
27
|
-
benchmarkFn: () => {
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
|
-
tree.currentView;
|
|
30
|
-
},
|
|
31
|
-
after: () => {
|
|
32
|
-
tree = undefined;
|
|
33
|
-
containerRuntimeFactory = undefined;
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
runSummaryLoadPerfTests('Summary Load');
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=SharedTree.perf.tests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.perf.tests.js","sourceRoot":"","sources":["../../src/test/SharedTree.perf.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIlE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEtF,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAChC,IAAI,IAA4B,CAAC;IACjC,IAAI,uBAAgE,CAAC;IACrE,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,EAAE,IAAK,CAAC,EAAE;QAC/B,SAAS,CAAC;YACT,IAAI,EAAE,aAAa,CAAC,WAAW;YAC/B,KAAK,EAAE,wBAAwB,KAAK,oBAAoB;YACxD,MAAM,EAAE,GAAG,EAAE;gBACZ,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,GAAG,mBAAmB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;gBAEhF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;oBAC/B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;iBACzC;gBAED,uBAAuB,CAAC,kBAAkB,EAAE,CAAC;gBAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAgB,CAAC;gBACtC,MAAM,CAAC,OAAO,CAAC,sBAAsB,KAAK,KAAK,CAAC,CAAC;gBACjD,MAAM,CAAC,OAAO,CAAC,kBAAkB,KAAK,CAAC,CAAC,CAAC;YAC1C,CAAC;YACD,WAAW,EAAE,GAAG,EAAE;gBACjB,oEAAoE;gBACpE,IAAK,CAAC,WAAW,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,GAAG,EAAE;gBACX,IAAI,GAAG,SAAS,CAAC;gBACjB,uBAAuB,GAAG,SAAS,CAAC;YACrC,CAAC;SACD,CAAC,CAAC;KACH;IAED,uBAAuB,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from 'assert';\nimport { benchmark, BenchmarkType } from '@fluid-tools/benchmark';\nimport { MockContainerRuntimeFactory } from '@fluidframework/test-runtime-utils';\nimport { EditLog } from '../EditLog.js';\nimport { SharedTree } from '../SharedTree.js';\nimport { runSummaryLoadPerfTests } from './utilities/SummaryLoadPerfTests.js';\nimport { createStableEdits, setUpTestSharedTree } from './utilities/TestUtilities.js';\n\ndescribe('SharedTree Perf', () => {\n\tlet tree: SharedTree | undefined;\n\tlet containerRuntimeFactory: MockContainerRuntimeFactory | undefined;\n\tfor (const count of [1, 1_000]) {\n\t\tbenchmark({\n\t\t\ttype: BenchmarkType.Measurement,\n\t\t\ttitle: `get currentView with ${count} sequenced edit(s)`,\n\t\t\tbefore: () => {\n\t\t\t\t({ tree, containerRuntimeFactory } = setUpTestSharedTree({ localMode: false }));\n\n\t\t\t\tconst edits = createStableEdits(count, tree);\n\t\t\t\tfor (let i = 0; i < count; i++) {\n\t\t\t\t\ttree.applyEditInternal(edits[i].changes);\n\t\t\t\t}\n\n\t\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\t\tconst editLog = tree.edits as EditLog;\n\t\t\t\tassert(editLog.numberOfSequencedEdits === count);\n\t\t\t\tassert(editLog.numberOfLocalEdits === 0);\n\t\t\t},\n\t\t\tbenchmarkFn: () => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\ttree!.currentView;\n\t\t\t},\n\t\t\tafter: () => {\n\t\t\t\ttree = undefined;\n\t\t\t\tcontainerRuntimeFactory = undefined;\n\t\t\t},\n\t\t});\n\t}\n\n\trunSummaryLoadPerfTests('Summary Load');\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.tests.d.ts","sourceRoot":"","sources":["../../src/test/SharedTree.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { WriteFormat } from '../persisted-types/index.js';
|
|
6
|
-
import { setUpTestSharedTree, setUpLocalServerTestSharedTree } from './utilities/TestUtilities.js';
|
|
7
|
-
import { runSharedTreeOperationsTests } from './utilities/SharedTreeTests.js';
|
|
8
|
-
import { runSummarySizeTests } from './utilities/SummarySizeTests.js';
|
|
9
|
-
import { runPendingLocalStateTests } from './utilities/PendingLocalStateTests.js';
|
|
10
|
-
import { runSharedTreeVersioningTests } from './utilities/SharedTreeVersioningTests.js';
|
|
11
|
-
import { runSummaryTests } from './Summary.tests.js';
|
|
12
|
-
describe('SharedTree', () => {
|
|
13
|
-
describe('Operations', () => {
|
|
14
|
-
runSharedTreeOperationsTests('using write format 0.0.2', WriteFormat.v0_0_2, setUpTestSharedTree);
|
|
15
|
-
runSharedTreeOperationsTests('using write format 0.1.1', WriteFormat.v0_1_1, setUpTestSharedTree);
|
|
16
|
-
});
|
|
17
|
-
runSummaryTests('Summaries');
|
|
18
|
-
runSummarySizeTests('Summary size', setUpLocalServerTestSharedTree);
|
|
19
|
-
runPendingLocalStateTests('Stashed ops', setUpLocalServerTestSharedTree);
|
|
20
|
-
runSharedTreeVersioningTests('Versioning', setUpTestSharedTree);
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=SharedTree.tests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.tests.js","sourceRoot":"","sources":["../../src/test/SharedTree.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC3B,4BAA4B,CAAC,0BAA0B,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;QAClG,4BAA4B,CAAC,0BAA0B,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACnG,CAAC,CAAC,CAAC;IACH,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7B,mBAAmB,CAAC,cAAc,EAAE,8BAA8B,CAAC,CAAC;IACpE,yBAAyB,CAAC,aAAa,EAAE,8BAA8B,CAAC,CAAC;IACzE,4BAA4B,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { WriteFormat } from '../persisted-types/index.js';\nimport { setUpTestSharedTree, setUpLocalServerTestSharedTree } from './utilities/TestUtilities.js';\nimport { runSharedTreeOperationsTests } from './utilities/SharedTreeTests.js';\nimport { runSummarySizeTests } from './utilities/SummarySizeTests.js';\nimport { runPendingLocalStateTests } from './utilities/PendingLocalStateTests.js';\nimport { runSharedTreeVersioningTests } from './utilities/SharedTreeVersioningTests.js';\nimport { runSummaryTests } from './Summary.tests.js';\n\ndescribe('SharedTree', () => {\n\tdescribe('Operations', () => {\n\t\trunSharedTreeOperationsTests('using write format 0.0.2', WriteFormat.v0_0_2, setUpTestSharedTree);\n\t\trunSharedTreeOperationsTests('using write format 0.1.1', WriteFormat.v0_1_1, setUpTestSharedTree);\n\t});\n\trunSummaryTests('Summaries');\n\trunSummarySizeTests('Summary size', setUpLocalServerTestSharedTree);\n\trunPendingLocalStateTests('Stashed ops', setUpLocalServerTestSharedTree);\n\trunSharedTreeVersioningTests('Versioning', setUpTestSharedTree);\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StringInterner.tests.d.ts","sourceRoot":"","sources":["../../src/test/StringInterner.tests.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|