@harperfast/harper 5.0.0-alpha.10
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/CODE_OF_CONDUCT.md +83 -0
- package/LICENSE +201 -0
- package/README.md +54 -0
- package/SECURITY.md +18 -0
- package/SUPPORT.md +26 -0
- package/dist/bin/BinObjects.d.ts +9 -0
- package/dist/bin/BinObjects.js +15 -0
- package/dist/bin/BinObjects.js.map +1 -0
- package/dist/bin/cliOperations.d.ts +12 -0
- package/dist/bin/cliOperations.js +156 -0
- package/dist/bin/cliOperations.js.map +1 -0
- package/dist/bin/copyDb.d.ts +2 -0
- package/dist/bin/copyDb.js +298 -0
- package/dist/bin/copyDb.js.map +1 -0
- package/dist/bin/harper.d.ts +2 -0
- package/dist/bin/harper.js +148 -0
- package/dist/bin/harper.js.map +1 -0
- package/dist/bin/install.d.ts +2 -0
- package/dist/bin/install.js +16 -0
- package/dist/bin/install.js.map +1 -0
- package/dist/bin/lite.d.ts +1 -0
- package/dist/bin/lite.js +6 -0
- package/dist/bin/lite.js.map +1 -0
- package/dist/bin/restart.d.ts +13 -0
- package/dist/bin/restart.js +194 -0
- package/dist/bin/restart.js.map +1 -0
- package/dist/bin/run.d.ts +21 -0
- package/dist/bin/run.js +365 -0
- package/dist/bin/run.js.map +1 -0
- package/dist/bin/status.d.ts +2 -0
- package/dist/bin/status.js +56 -0
- package/dist/bin/status.js.map +1 -0
- package/dist/bin/stop.d.ts +2 -0
- package/dist/bin/stop.js +17 -0
- package/dist/bin/stop.js.map +1 -0
- package/dist/bin/upgrade.d.ts +7 -0
- package/dist/bin/upgrade.js +111 -0
- package/dist/bin/upgrade.js.map +1 -0
- package/dist/components/Application.d.ts +110 -0
- package/dist/components/Application.js +509 -0
- package/dist/components/Application.js.map +1 -0
- package/dist/components/ApplicationScope.d.ts +28 -0
- package/dist/components/ApplicationScope.js +81 -0
- package/dist/components/ApplicationScope.js.map +1 -0
- package/dist/components/Component.d.ts +21 -0
- package/dist/components/Component.js +43 -0
- package/dist/components/Component.js.map +1 -0
- package/dist/components/ComponentV1.d.ts +69 -0
- package/dist/components/ComponentV1.js +263 -0
- package/dist/components/ComponentV1.js.map +1 -0
- package/dist/components/DEFAULT_CONFIG.d.ts +18 -0
- package/dist/components/DEFAULT_CONFIG.js +22 -0
- package/dist/components/DEFAULT_CONFIG.js.map +1 -0
- package/dist/components/EntryHandler.d.ts +61 -0
- package/dist/components/EntryHandler.js +148 -0
- package/dist/components/EntryHandler.js.map +1 -0
- package/dist/components/OptionsWatcher.d.ts +75 -0
- package/dist/components/OptionsWatcher.js +281 -0
- package/dist/components/OptionsWatcher.js.map +1 -0
- package/dist/components/PluginModule.d.ts +5 -0
- package/dist/components/PluginModule.js +3 -0
- package/dist/components/PluginModule.js.map +1 -0
- package/dist/components/Scope.d.ts +49 -0
- package/dist/components/Scope.js +262 -0
- package/dist/components/Scope.js.map +1 -0
- package/dist/components/componentLoader.js +498 -0
- package/dist/components/componentLoader.js.map +1 -0
- package/dist/components/deriveCommonPatternBase.d.ts +1 -0
- package/dist/components/deriveCommonPatternBase.js +34 -0
- package/dist/components/deriveCommonPatternBase.js.map +1 -0
- package/dist/components/deriveGlobOptions.d.ts +13 -0
- package/dist/components/deriveGlobOptions.js +30 -0
- package/dist/components/deriveGlobOptions.js.map +1 -0
- package/dist/components/deriveURLPath.d.ts +3 -0
- package/dist/components/deriveURLPath.js +55 -0
- package/dist/components/deriveURLPath.js.map +1 -0
- package/dist/components/operations.d.ts +97 -0
- package/dist/components/operations.js +556 -0
- package/dist/components/operations.js.map +1 -0
- package/dist/components/operationsValidation.d.ts +44 -0
- package/dist/components/operationsValidation.js +221 -0
- package/dist/components/operationsValidation.js.map +1 -0
- package/dist/components/packageComponent.d.ts +8 -0
- package/dist/components/packageComponent.js +42 -0
- package/dist/components/packageComponent.js.map +1 -0
- package/dist/components/requestRestart.d.ts +3 -0
- package/dist/components/requestRestart.js +27 -0
- package/dist/components/requestRestart.js.map +1 -0
- package/dist/components/resolveBaseURLPath.d.ts +15 -0
- package/dist/components/resolveBaseURLPath.js +38 -0
- package/dist/components/resolveBaseURLPath.js.map +1 -0
- package/dist/components/status/ComponentStatus.d.ts +61 -0
- package/dist/components/status/ComponentStatus.js +102 -0
- package/dist/components/status/ComponentStatus.js.map +1 -0
- package/dist/components/status/ComponentStatusRegistry.d.ts +89 -0
- package/dist/components/status/ComponentStatusRegistry.js +195 -0
- package/dist/components/status/ComponentStatusRegistry.js.map +1 -0
- package/dist/components/status/api.d.ts +104 -0
- package/dist/components/status/api.js +137 -0
- package/dist/components/status/api.js.map +1 -0
- package/dist/components/status/crossThread.d.ts +62 -0
- package/dist/components/status/crossThread.js +343 -0
- package/dist/components/status/crossThread.js.map +1 -0
- package/dist/components/status/errors.d.ts +68 -0
- package/dist/components/status/errors.js +123 -0
- package/dist/components/status/errors.js.map +1 -0
- package/dist/components/status/index.d.ts +35 -0
- package/dist/components/status/index.js +75 -0
- package/dist/components/status/index.js.map +1 -0
- package/dist/components/status/internal.d.ts +40 -0
- package/dist/components/status/internal.js +76 -0
- package/dist/components/status/internal.js.map +1 -0
- package/dist/components/status/registry.d.ts +10 -0
- package/dist/components/status/registry.js +14 -0
- package/dist/components/status/registry.js.map +1 -0
- package/dist/components/status/types.d.ts +94 -0
- package/dist/components/status/types.js +20 -0
- package/dist/components/status/types.js.map +1 -0
- package/dist/config/RootConfigWatcher.d.ts +10 -0
- package/dist/config/RootConfigWatcher.js +59 -0
- package/dist/config/RootConfigWatcher.js.map +1 -0
- package/dist/config/configHelpers.d.ts +6 -0
- package/dist/config/configHelpers.js +47 -0
- package/dist/config/configHelpers.js.map +1 -0
- package/dist/config/configUtils.d.ts +85 -0
- package/dist/config/configUtils.js +801 -0
- package/dist/config/configUtils.js.map +1 -0
- package/dist/config/harperConfigEnvVars.d.ts +46 -0
- package/dist/config/harperConfigEnvVars.js +527 -0
- package/dist/config/harperConfigEnvVars.js.map +1 -0
- package/dist/dataLayer/CreateAttributeObject.d.ts +19 -0
- package/dist/dataLayer/CreateAttributeObject.js +23 -0
- package/dist/dataLayer/CreateAttributeObject.js.map +1 -0
- package/dist/dataLayer/CreateTableObject.d.ts +7 -0
- package/dist/dataLayer/CreateTableObject.js +10 -0
- package/dist/dataLayer/CreateTableObject.js.map +1 -0
- package/dist/dataLayer/DataLayerObjects.d.ts +22 -0
- package/dist/dataLayer/DataLayerObjects.js +33 -0
- package/dist/dataLayer/DataLayerObjects.js.map +1 -0
- package/dist/dataLayer/DeleteBeforeObject.d.ts +18 -0
- package/dist/dataLayer/DeleteBeforeObject.js +21 -0
- package/dist/dataLayer/DeleteBeforeObject.js.map +1 -0
- package/dist/dataLayer/DeleteObject.d.ts +19 -0
- package/dist/dataLayer/DeleteObject.js +23 -0
- package/dist/dataLayer/DeleteObject.js.map +1 -0
- package/dist/dataLayer/DropAttributeObject.d.ts +7 -0
- package/dist/dataLayer/DropAttributeObject.js +10 -0
- package/dist/dataLayer/DropAttributeObject.js.map +1 -0
- package/dist/dataLayer/GetBackupObject.d.ts +16 -0
- package/dist/dataLayer/GetBackupObject.js +20 -0
- package/dist/dataLayer/GetBackupObject.js.map +1 -0
- package/dist/dataLayer/InsertObject.d.ts +20 -0
- package/dist/dataLayer/InsertObject.js +24 -0
- package/dist/dataLayer/InsertObject.js.map +1 -0
- package/dist/dataLayer/ReadAuditLogObject.d.ts +18 -0
- package/dist/dataLayer/ReadAuditLogObject.js +22 -0
- package/dist/dataLayer/ReadAuditLogObject.js.map +1 -0
- package/dist/dataLayer/SQLSearch.d.ts +171 -0
- package/dist/dataLayer/SQLSearch.js +1168 -0
- package/dist/dataLayer/SQLSearch.js.map +1 -0
- package/dist/dataLayer/SearchByConditionsObject.d.ts +85 -0
- package/dist/dataLayer/SearchByConditionsObject.js +57 -0
- package/dist/dataLayer/SearchByConditionsObject.js.map +1 -0
- package/dist/dataLayer/SearchByHashObject.d.ts +17 -0
- package/dist/dataLayer/SearchByHashObject.js +20 -0
- package/dist/dataLayer/SearchByHashObject.js.map +1 -0
- package/dist/dataLayer/SearchObject.d.ts +30 -0
- package/dist/dataLayer/SearchObject.js +33 -0
- package/dist/dataLayer/SearchObject.js.map +1 -0
- package/dist/dataLayer/SqlSearchObject.d.ts +10 -0
- package/dist/dataLayer/SqlSearchObject.js +13 -0
- package/dist/dataLayer/SqlSearchObject.js.map +1 -0
- package/dist/dataLayer/UpdateObject.d.ts +18 -0
- package/dist/dataLayer/UpdateObject.js +22 -0
- package/dist/dataLayer/UpdateObject.js.map +1 -0
- package/dist/dataLayer/UpsertObject.d.ts +18 -0
- package/dist/dataLayer/UpsertObject.js +22 -0
- package/dist/dataLayer/UpsertObject.js.map +1 -0
- package/dist/dataLayer/bulkLoad.d.ts +28 -0
- package/dist/dataLayer/bulkLoad.js +624 -0
- package/dist/dataLayer/bulkLoad.js.map +1 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.d.ts +17 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.js +25 -0
- package/dist/dataLayer/dataObjects/BulkLoadObjects.js.map +1 -0
- package/dist/dataLayer/dataObjects/UpsertObject.d.ts +18 -0
- package/dist/dataLayer/dataObjects/UpsertObject.js +22 -0
- package/dist/dataLayer/dataObjects/UpsertObject.js.map +1 -0
- package/dist/dataLayer/delete.d.ts +22 -0
- package/dist/dataLayer/delete.js +111 -0
- package/dist/dataLayer/delete.js.map +1 -0
- package/dist/dataLayer/export.d.ts +15 -0
- package/dist/dataLayer/export.js +302 -0
- package/dist/dataLayer/export.js.map +1 -0
- package/dist/dataLayer/getBackup.d.ts +8 -0
- package/dist/dataLayer/getBackup.js +28 -0
- package/dist/dataLayer/getBackup.js.map +1 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.d.ts +24 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.js +62 -0
- package/dist/dataLayer/harperBridge/BridgeMethods.js.map +1 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.d.ts +104 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.js +630 -0
- package/dist/dataLayer/harperBridge/ResourceBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.d.ts +14 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.js +24 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateReturnObj.js.map +1 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.d.ts +11 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.js +68 -0
- package/dist/dataLayer/harperBridge/bridgeUtility/insertUpdateValidate.js.map +1 -0
- package/dist/dataLayer/harperBridge/harperBridge.d.ts +2 -0
- package/dist/dataLayer/harperBridge/harperBridge.js +18 -0
- package/dist/dataLayer/harperBridge/harperBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.d.ts +47 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.js +99 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/LMDBBridge.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.d.ts +12 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.js +74 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.d.ts +13 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.js +54 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js +62 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.js +82 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteAuditLogsBefore.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.d.ts +11 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.js +76 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.d.ts +9 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.js +83 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.js +73 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.js +110 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.d.ts +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.js +33 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbFlush.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.js +110 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetBackup.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.js +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.d.ts +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.js +25 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.js +180 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadAuditLog.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.js +134 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.d.ts +6 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.js +14 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.js +26 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.js +17 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbTransaction.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.d.ts +12 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.js +52 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.d.ts +15 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.js +56 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.js +20 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.js +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.d.ts +16 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.js +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.d.ts +19 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.js +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.d.ts +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.d.ts +18 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.js +23 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.d.ts +21 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js +24 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.d.ts +7 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.js +19 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.d.ts +22 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js +137 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.d.ts +9 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.js +73 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.js +38 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsAuditEnvironment.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js +29 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.d.ts +17 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.js +63 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.d.ts +106 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.js +251 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.js.map +1 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.d.ts +8 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.js +66 -0
- package/dist/dataLayer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.js.map +1 -0
- package/dist/dataLayer/hdbInfoController.d.ts +28 -0
- package/dist/dataLayer/hdbInfoController.js +203 -0
- package/dist/dataLayer/hdbInfoController.js.map +1 -0
- package/dist/dataLayer/insert.d.ts +44 -0
- package/dist/dataLayer/insert.js +192 -0
- package/dist/dataLayer/insert.js.map +1 -0
- package/dist/dataLayer/readAuditLog.d.ts +8 -0
- package/dist/dataLayer/readAuditLog.js +37 -0
- package/dist/dataLayer/readAuditLog.js.map +1 -0
- package/dist/dataLayer/schema.d.ts +24 -0
- package/dist/dataLayer/schema.js +225 -0
- package/dist/dataLayer/schema.js.map +1 -0
- package/dist/dataLayer/schemaDescribe.d.ts +26 -0
- package/dist/dataLayer/schemaDescribe.js +265 -0
- package/dist/dataLayer/schemaDescribe.js.map +1 -0
- package/dist/dataLayer/search.d.ts +4 -0
- package/dist/dataLayer/search.js +56 -0
- package/dist/dataLayer/search.js.map +1 -0
- package/dist/dataLayer/transaction.d.ts +8 -0
- package/dist/dataLayer/transaction.js +16 -0
- package/dist/dataLayer/transaction.js.map +1 -0
- package/dist/dataLayer/update.d.ts +15 -0
- package/dist/dataLayer/update.js +107 -0
- package/dist/dataLayer/update.js.map +1 -0
- package/dist/globals.d.ts +7 -0
- package/dist/globals.js +12 -0
- package/dist/globals.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/json/systemSchema.json +373 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.d.ts +4 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.js +13 -0
- package/dist/launchServiceScripts/utility/checkNodeVersion.js.map +1 -0
- package/dist/resources/DatabaseTransaction.d.ts +96 -0
- package/dist/resources/DatabaseTransaction.js +354 -0
- package/dist/resources/DatabaseTransaction.js.map +1 -0
- package/dist/resources/ErrorResource.d.ts +26 -0
- package/dist/resources/ErrorResource.js +60 -0
- package/dist/resources/ErrorResource.js.map +1 -0
- package/dist/resources/IterableEventQueue.d.ts +19 -0
- package/dist/resources/IterableEventQueue.js +103 -0
- package/dist/resources/IterableEventQueue.js.map +1 -0
- package/dist/resources/LMDBTransaction.d.ts +43 -0
- package/dist/resources/LMDBTransaction.js +371 -0
- package/dist/resources/LMDBTransaction.js.map +1 -0
- package/dist/resources/RecordEncoder.d.ts +65 -0
- package/dist/resources/RecordEncoder.js +700 -0
- package/dist/resources/RecordEncoder.js.map +1 -0
- package/dist/resources/RequestTarget.d.ts +57 -0
- package/dist/resources/RequestTarget.js +91 -0
- package/dist/resources/RequestTarget.js.map +1 -0
- package/dist/resources/Resource.d.ts +152 -0
- package/dist/resources/Resource.js +727 -0
- package/dist/resources/Resource.js.map +1 -0
- package/dist/resources/ResourceInterface.d.ts +162 -0
- package/dist/resources/ResourceInterface.js +3 -0
- package/dist/resources/ResourceInterface.js.map +1 -0
- package/dist/resources/ResourceInterfaceV2.d.ts +21 -0
- package/dist/resources/ResourceInterfaceV2.js +3 -0
- package/dist/resources/ResourceInterfaceV2.js.map +1 -0
- package/dist/resources/ResourceV2.d.ts +30 -0
- package/dist/resources/ResourceV2.js +27 -0
- package/dist/resources/ResourceV2.js.map +1 -0
- package/dist/resources/Resources.d.ts +36 -0
- package/dist/resources/Resources.js +155 -0
- package/dist/resources/Resources.js.map +1 -0
- package/dist/resources/RocksIndexStore.d.ts +24 -0
- package/dist/resources/RocksIndexStore.js +54 -0
- package/dist/resources/RocksIndexStore.js.map +1 -0
- package/dist/resources/RocksTransactionLogStore.d.ts +60 -0
- package/dist/resources/RocksTransactionLogStore.js +344 -0
- package/dist/resources/RocksTransactionLogStore.js.map +1 -0
- package/dist/resources/Table.d.ts +854 -0
- package/dist/resources/Table.js +4350 -0
- package/dist/resources/Table.js.map +1 -0
- package/dist/resources/analytics/hostnames.d.ts +16 -0
- package/dist/resources/analytics/hostnames.js +72 -0
- package/dist/resources/analytics/hostnames.js.map +1 -0
- package/dist/resources/analytics/metadata.d.ts +9 -0
- package/dist/resources/analytics/metadata.js +12 -0
- package/dist/resources/analytics/metadata.js.map +1 -0
- package/dist/resources/analytics/profile.d.ts +2 -0
- package/dist/resources/analytics/profile.js +144 -0
- package/dist/resources/analytics/profile.js.map +1 -0
- package/dist/resources/analytics/read.d.ts +41 -0
- package/dist/resources/analytics/read.js +189 -0
- package/dist/resources/analytics/read.js.map +1 -0
- package/dist/resources/analytics/write.d.ts +131 -0
- package/dist/resources/analytics/write.js +822 -0
- package/dist/resources/analytics/write.js.map +1 -0
- package/dist/resources/auditStore.d.ts +81 -0
- package/dist/resources/auditStore.js +572 -0
- package/dist/resources/auditStore.js.map +1 -0
- package/dist/resources/blob.d.ts +137 -0
- package/dist/resources/blob.js +1273 -0
- package/dist/resources/blob.js.map +1 -0
- package/dist/resources/crdt.d.ts +19 -0
- package/dist/resources/crdt.js +146 -0
- package/dist/resources/crdt.js.map +1 -0
- package/dist/resources/dataLoader.d.ts +98 -0
- package/dist/resources/dataLoader.js +461 -0
- package/dist/resources/dataLoader.js.map +1 -0
- package/dist/resources/databases.d.ts +131 -0
- package/dist/resources/databases.js +1220 -0
- package/dist/resources/databases.js.map +1 -0
- package/dist/resources/graphql.d.ts +19 -0
- package/dist/resources/graphql.js +223 -0
- package/dist/resources/graphql.js.map +1 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.d.ts +87 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js +598 -0
- package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js.map +1 -0
- package/dist/resources/indexes/customIndexes.d.ts +4 -0
- package/dist/resources/indexes/customIndexes.js +10 -0
- package/dist/resources/indexes/customIndexes.js.map +1 -0
- package/dist/resources/indexes/vector.d.ts +2 -0
- package/dist/resources/indexes/vector.js +40 -0
- package/dist/resources/indexes/vector.js.map +1 -0
- package/dist/resources/jsResource.d.ts +24 -0
- package/dist/resources/jsResource.js +82 -0
- package/dist/resources/jsResource.js.map +1 -0
- package/dist/resources/loadEnv.d.ts +5 -0
- package/dist/resources/loadEnv.js +28 -0
- package/dist/resources/loadEnv.js.map +1 -0
- package/dist/resources/login.d.ts +3 -0
- package/dist/resources/login.js +22 -0
- package/dist/resources/login.js.map +1 -0
- package/dist/resources/openApi.d.ts +27 -0
- package/dist/resources/openApi.js +327 -0
- package/dist/resources/openApi.js.map +1 -0
- package/dist/resources/registrationDeprecated.d.ts +4 -0
- package/dist/resources/registrationDeprecated.js +11 -0
- package/dist/resources/registrationDeprecated.js.map +1 -0
- package/dist/resources/replayLogs.d.ts +2 -0
- package/dist/resources/replayLogs.js +170 -0
- package/dist/resources/replayLogs.js.map +1 -0
- package/dist/resources/roles.d.ts +11 -0
- package/dist/resources/roles.js +102 -0
- package/dist/resources/roles.js.map +1 -0
- package/dist/resources/search.d.ts +39 -0
- package/dist/resources/search.js +1333 -0
- package/dist/resources/search.js.map +1 -0
- package/dist/resources/tracked.d.ts +49 -0
- package/dist/resources/tracked.js +665 -0
- package/dist/resources/tracked.js.map +1 -0
- package/dist/resources/transaction.d.ts +9 -0
- package/dist/resources/transaction.js +89 -0
- package/dist/resources/transaction.js.map +1 -0
- package/dist/resources/transactionBroadcast.d.ts +38 -0
- package/dist/resources/transactionBroadcast.js +263 -0
- package/dist/resources/transactionBroadcast.js.map +1 -0
- package/dist/security/auth.d.ts +9 -0
- package/dist/security/auth.js +408 -0
- package/dist/security/auth.js.map +1 -0
- package/dist/security/certificateVerification/certificateVerificationSource.d.ts +18 -0
- package/dist/security/certificateVerification/certificateVerificationSource.js +78 -0
- package/dist/security/certificateVerification/certificateVerificationSource.js.map +1 -0
- package/dist/security/certificateVerification/configValidation.d.ts +14 -0
- package/dist/security/certificateVerification/configValidation.js +101 -0
- package/dist/security/certificateVerification/configValidation.js.map +1 -0
- package/dist/security/certificateVerification/crlVerification.d.ts +29 -0
- package/dist/security/certificateVerification/crlVerification.js +564 -0
- package/dist/security/certificateVerification/crlVerification.js.map +1 -0
- package/dist/security/certificateVerification/index.d.ts +31 -0
- package/dist/security/certificateVerification/index.js +111 -0
- package/dist/security/certificateVerification/index.js.map +1 -0
- package/dist/security/certificateVerification/ocspVerification.d.ts +23 -0
- package/dist/security/certificateVerification/ocspVerification.js +117 -0
- package/dist/security/certificateVerification/ocspVerification.js.map +1 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.d.ts +14 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.js +183 -0
- package/dist/security/certificateVerification/pkijs-ed25519-patch.js.map +1 -0
- package/dist/security/certificateVerification/types.d.ts +105 -0
- package/dist/security/certificateVerification/types.js +6 -0
- package/dist/security/certificateVerification/types.js.map +1 -0
- package/dist/security/certificateVerification/verificationConfig.d.ts +29 -0
- package/dist/security/certificateVerification/verificationConfig.js +121 -0
- package/dist/security/certificateVerification/verificationConfig.js.map +1 -0
- package/dist/security/certificateVerification/verificationUtils.d.ts +79 -0
- package/dist/security/certificateVerification/verificationUtils.js +441 -0
- package/dist/security/certificateVerification/verificationUtils.js.map +1 -0
- package/dist/security/cryptoHash.d.ts +2 -0
- package/dist/security/cryptoHash.js +35 -0
- package/dist/security/cryptoHash.js.map +1 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.d.ts +11 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.js +14 -0
- package/dist/security/data_objects/PermissionAttributeResponseObject.js.map +1 -0
- package/dist/security/data_objects/PermissionResponseObject.d.ts +57 -0
- package/dist/security/data_objects/PermissionResponseObject.js +105 -0
- package/dist/security/data_objects/PermissionResponseObject.js.map +1 -0
- package/dist/security/data_objects/PermissionTableResponseObject.d.ts +16 -0
- package/dist/security/data_objects/PermissionTableResponseObject.js +19 -0
- package/dist/security/data_objects/PermissionTableResponseObject.js.map +1 -0
- package/dist/security/fastifyAuth.d.ts +2 -0
- package/dist/security/fastifyAuth.js +135 -0
- package/dist/security/fastifyAuth.js.map +1 -0
- package/dist/security/impersonation.d.ts +11 -0
- package/dist/security/impersonation.js +139 -0
- package/dist/security/impersonation.js.map +1 -0
- package/dist/security/jsLoader.d.ts +9 -0
- package/dist/security/jsLoader.js +522 -0
- package/dist/security/jsLoader.js.map +1 -0
- package/dist/security/keys.d.ts +119 -0
- package/dist/security/keys.js +866 -0
- package/dist/security/keys.js.map +1 -0
- package/dist/security/permissionsTranslator.d.ts +9 -0
- package/dist/security/permissionsTranslator.js +269 -0
- package/dist/security/permissionsTranslator.js.map +1 -0
- package/dist/security/role.d.ts +5 -0
- package/dist/security/role.js +160 -0
- package/dist/security/role.js.map +1 -0
- package/dist/security/tokenAuthentication.d.ts +38 -0
- package/dist/security/tokenAuthentication.js +205 -0
- package/dist/security/tokenAuthentication.js.map +1 -0
- package/dist/security/user.d.ts +77 -0
- package/dist/security/user.js +349 -0
- package/dist/security/user.js.map +1 -0
- package/dist/server/DurableSubscriptionsSession.d.ts +74 -0
- package/dist/server/DurableSubscriptionsSession.js +511 -0
- package/dist/server/DurableSubscriptionsSession.js.map +1 -0
- package/dist/server/REST.d.ts +16 -0
- package/dist/server/REST.js +423 -0
- package/dist/server/REST.js.map +1 -0
- package/dist/server/Server.d.ts +62 -0
- package/dist/server/Server.js +27 -0
- package/dist/server/Server.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.d.ts +11 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.js +32 -0
- package/dist/server/fastifyRoutes/helpers/getCORSOptions.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.d.ts +6 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.js +13 -0
- package/dist/server/fastifyRoutes/helpers/getHeaderTimeoutConfig.js.map +1 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.d.ts +12 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.js +30 -0
- package/dist/server/fastifyRoutes/helpers/getServerOptions.js.map +1 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.d.ts +2 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.js +31 -0
- package/dist/server/fastifyRoutes/plugins/hdbCore.js.map +1 -0
- package/dist/server/fastifyRoutes.d.ts +25 -0
- package/dist/server/fastifyRoutes.js +235 -0
- package/dist/server/fastifyRoutes.js.map +1 -0
- package/dist/server/graphqlQuerying.d.ts +1 -0
- package/dist/server/graphqlQuerying.js +630 -0
- package/dist/server/graphqlQuerying.js.map +1 -0
- package/dist/server/http.d.ts +15 -0
- package/dist/server/http.js +650 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/itc/serverHandlers.d.ts +10 -0
- package/dist/server/itc/serverHandlers.js +153 -0
- package/dist/server/itc/serverHandlers.js.map +1 -0
- package/dist/server/itc/utility/ITCEventObject.d.ts +6 -0
- package/dist/server/itc/utility/ITCEventObject.js +9 -0
- package/dist/server/itc/utility/ITCEventObject.js.map +1 -0
- package/dist/server/jobs/JobObject.d.ts +15 -0
- package/dist/server/jobs/JobObject.js +22 -0
- package/dist/server/jobs/JobObject.js.map +1 -0
- package/dist/server/jobs/jobProcess.d.ts +1 -0
- package/dist/server/jobs/jobProcess.js +66 -0
- package/dist/server/jobs/jobProcess.js.map +1 -0
- package/dist/server/jobs/jobRunner.d.ts +11 -0
- package/dist/server/jobs/jobRunner.js +160 -0
- package/dist/server/jobs/jobRunner.js.map +1 -0
- package/dist/server/jobs/jobs.d.ts +20 -0
- package/dist/server/jobs/jobs.js +267 -0
- package/dist/server/jobs/jobs.js.map +1 -0
- package/dist/server/loadRootComponents.d.ts +5 -0
- package/dist/server/loadRootComponents.js +45 -0
- package/dist/server/loadRootComponents.js.map +1 -0
- package/dist/server/mqtt.d.ts +9 -0
- package/dist/server/mqtt.js +466 -0
- package/dist/server/mqtt.js.map +1 -0
- package/dist/server/nodeName.d.ts +5 -0
- package/dist/server/nodeName.js +84 -0
- package/dist/server/nodeName.js.map +1 -0
- package/dist/server/operationsServer.d.ts +48 -0
- package/dist/server/operationsServer.js +265 -0
- package/dist/server/operationsServer.js.map +1 -0
- package/dist/server/serverHelpers/Headers.d.ts +20 -0
- package/dist/server/serverHelpers/Headers.js +134 -0
- package/dist/server/serverHelpers/Headers.js.map +1 -0
- package/dist/server/serverHelpers/JSONStream.d.ts +14 -0
- package/dist/server/serverHelpers/JSONStream.js +322 -0
- package/dist/server/serverHelpers/JSONStream.js.map +1 -0
- package/dist/server/serverHelpers/OperationFunctionObject.d.ts +9 -0
- package/dist/server/serverHelpers/OperationFunctionObject.js +17 -0
- package/dist/server/serverHelpers/OperationFunctionObject.js.map +1 -0
- package/dist/server/serverHelpers/Request.d.ts +69 -0
- package/dist/server/serverHelpers/Request.js +141 -0
- package/dist/server/serverHelpers/Request.js.map +1 -0
- package/dist/server/serverHelpers/contentTypes.d.ts +57 -0
- package/dist/server/serverHelpers/contentTypes.js +639 -0
- package/dist/server/serverHelpers/contentTypes.js.map +1 -0
- package/dist/server/serverHelpers/requestTimePlugin.d.ts +2 -0
- package/dist/server/serverHelpers/requestTimePlugin.js +56 -0
- package/dist/server/serverHelpers/requestTimePlugin.js.map +1 -0
- package/dist/server/serverHelpers/serverHandlers.d.ts +6 -0
- package/dist/server/serverHelpers/serverHandlers.js +130 -0
- package/dist/server/serverHelpers/serverHandlers.js.map +1 -0
- package/dist/server/serverHelpers/serverUtilities.d.ts +29 -0
- package/dist/server/serverHelpers/serverUtilities.js +356 -0
- package/dist/server/serverHelpers/serverUtilities.js.map +1 -0
- package/dist/server/serverRegistry.d.ts +3 -0
- package/dist/server/serverRegistry.js +11 -0
- package/dist/server/serverRegistry.js.map +1 -0
- package/dist/server/static.d.ts +16 -0
- package/dist/server/static.js +164 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server/status/definitions.d.ts +27 -0
- package/dist/server/status/definitions.js +22 -0
- package/dist/server/status/definitions.js.map +1 -0
- package/dist/server/status/index.d.ts +26 -0
- package/dist/server/status/index.js +89 -0
- package/dist/server/status/index.js.map +1 -0
- package/dist/server/storageReclamation.d.ts +18 -0
- package/dist/server/storageReclamation.js +96 -0
- package/dist/server/storageReclamation.js.map +1 -0
- package/dist/server/threads/itc.d.ts +53 -0
- package/dist/server/threads/itc.js +81 -0
- package/dist/server/threads/itc.js.map +1 -0
- package/dist/server/threads/manageThreads.d.ts +30 -0
- package/dist/server/threads/manageThreads.js +579 -0
- package/dist/server/threads/manageThreads.js.map +1 -0
- package/dist/server/threads/socketRouter.d.ts +6 -0
- package/dist/server/threads/socketRouter.js +395 -0
- package/dist/server/threads/socketRouter.js.map +1 -0
- package/dist/server/threads/threadServer.d.ts +5 -0
- package/dist/server/threads/threadServer.js +288 -0
- package/dist/server/threads/threadServer.js.map +1 -0
- package/dist/server/throttle.d.ts +7 -0
- package/dist/server/throttle.js +71 -0
- package/dist/server/throttle.js.map +1 -0
- package/dist/sqlTranslator/SelectValidator.d.ts +79 -0
- package/dist/sqlTranslator/SelectValidator.js +274 -0
- package/dist/sqlTranslator/SelectValidator.js.map +1 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.d.ts +2 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.js +55 -0
- package/dist/sqlTranslator/alasqlFunctionImporter.js.map +1 -0
- package/dist/sqlTranslator/deleteTranslator.d.ts +2 -0
- package/dist/sqlTranslator/deleteTranslator.js +56 -0
- package/dist/sqlTranslator/deleteTranslator.js.map +1 -0
- package/dist/sqlTranslator/index.d.ts +16 -0
- package/dist/sqlTranslator/index.js +215 -0
- package/dist/sqlTranslator/index.js.map +1 -0
- package/dist/sqlTranslator/sql_statement_bucket.d.ts +46 -0
- package/dist/sqlTranslator/sql_statement_bucket.js +430 -0
- package/dist/sqlTranslator/sql_statement_bucket.js.map +1 -0
- package/dist/upgrade/UpgradeObjects.d.ts +5 -0
- package/dist/upgrade/UpgradeObjects.js +12 -0
- package/dist/upgrade/UpgradeObjects.js.map +1 -0
- package/dist/upgrade/directives/directivesController.d.ts +30 -0
- package/dist/upgrade/directives/directivesController.js +76 -0
- package/dist/upgrade/directives/directivesController.js.map +1 -0
- package/dist/upgrade/directivesManager.d.ts +7 -0
- package/dist/upgrade/directivesManager.js +125 -0
- package/dist/upgrade/directivesManager.js.map +1 -0
- package/dist/upgrade/upgradePrompt.d.ts +13 -0
- package/dist/upgrade/upgradePrompt.js +102 -0
- package/dist/upgrade/upgradePrompt.js.map +1 -0
- package/dist/upgrade/upgradeUtilities.d.ts +10 -0
- package/dist/upgrade/upgradeUtilities.js +26 -0
- package/dist/upgrade/upgradeUtilities.js.map +1 -0
- package/dist/utility/AWS/AWSConnector.d.ts +2 -0
- package/dist/utility/AWS/AWSConnector.js +26 -0
- package/dist/utility/AWS/AWSConnector.js.map +1 -0
- package/dist/utility/OperationFunctionCaller.d.ts +9 -0
- package/dist/utility/OperationFunctionCaller.js +58 -0
- package/dist/utility/OperationFunctionCaller.js.map +1 -0
- package/dist/utility/assignCmdEnvVariables.d.ts +10 -0
- package/dist/utility/assignCmdEnvVariables.js +55 -0
- package/dist/utility/assignCmdEnvVariables.js.map +1 -0
- package/dist/utility/common_utils.d.ts +264 -0
- package/dist/utility/common_utils.js +806 -0
- package/dist/utility/common_utils.js.map +1 -0
- package/dist/utility/environment/environmentManager.d.ts +41 -0
- package/dist/utility/environment/environmentManager.js +179 -0
- package/dist/utility/environment/environmentManager.js.map +1 -0
- package/dist/utility/environment/systemInformation.d.ts +67 -0
- package/dist/utility/environment/systemInformation.js +326 -0
- package/dist/utility/environment/systemInformation.js.map +1 -0
- package/dist/utility/errors/commonErrors.d.ts +171 -0
- package/dist/utility/errors/commonErrors.js +230 -0
- package/dist/utility/errors/commonErrors.js.map +1 -0
- package/dist/utility/errors/hdbError.d.ts +76 -0
- package/dist/utility/errors/hdbError.js +128 -0
- package/dist/utility/errors/hdbError.js.map +1 -0
- package/dist/utility/functions/date/dateFunctions.d.ts +11 -0
- package/dist/utility/functions/date/dateFunctions.js +64 -0
- package/dist/utility/functions/date/dateFunctions.js.map +1 -0
- package/dist/utility/functions/geo.d.ts +74 -0
- package/dist/utility/functions/geo.js +311 -0
- package/dist/utility/functions/geo.js.map +1 -0
- package/dist/utility/functions/sql/alaSQLExtension.d.ts +13 -0
- package/dist/utility/functions/sql/alaSQLExtension.js +96 -0
- package/dist/utility/functions/sql/alaSQLExtension.js.map +1 -0
- package/dist/utility/globalSchema.d.ts +151 -0
- package/dist/utility/globalSchema.js +34 -0
- package/dist/utility/globalSchema.js.map +1 -0
- package/dist/utility/hdbTerms.d.ts +737 -0
- package/dist/utility/hdbTerms.js +756 -0
- package/dist/utility/hdbTerms.js.map +1 -0
- package/dist/utility/install/checkJWTTokensExist.d.ts +5 -0
- package/dist/utility/install/checkJWTTokensExist.js +53 -0
- package/dist/utility/install/checkJWTTokensExist.js.map +1 -0
- package/dist/utility/install/installer.d.ts +17 -0
- package/dist/utility/install/installer.js +569 -0
- package/dist/utility/install/installer.js.map +1 -0
- package/dist/utility/installation.d.ts +12 -0
- package/dist/utility/installation.js +64 -0
- package/dist/utility/installation.js.map +1 -0
- package/dist/utility/lmdb/DBIDefinition.d.ts +16 -0
- package/dist/utility/lmdb/DBIDefinition.js +19 -0
- package/dist/utility/lmdb/DBIDefinition.js.map +1 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.d.ts +21 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.js +24 -0
- package/dist/utility/lmdb/DeleteRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.d.ts +18 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.js +21 -0
- package/dist/utility/lmdb/InsertRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/OpenDBIObject.d.ts +23 -0
- package/dist/utility/lmdb/OpenDBIObject.js +29 -0
- package/dist/utility/lmdb/OpenDBIObject.js.map +1 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.d.ts +22 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.js +40 -0
- package/dist/utility/lmdb/OpenEnvironmentObject.js.map +1 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.d.ts +21 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.js +24 -0
- package/dist/utility/lmdb/UpdateRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.d.ts +18 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.js +21 -0
- package/dist/utility/lmdb/UpsertRecordsResponseObject.js.map +1 -0
- package/dist/utility/lmdb/cleanLMDBMap.d.ts +6 -0
- package/dist/utility/lmdb/cleanLMDBMap.js +63 -0
- package/dist/utility/lmdb/cleanLMDBMap.js.map +1 -0
- package/dist/utility/lmdb/commonUtility.d.ts +28 -0
- package/dist/utility/lmdb/commonUtility.js +120 -0
- package/dist/utility/lmdb/commonUtility.js.map +1 -0
- package/dist/utility/lmdb/deleteUtility.d.ts +10 -0
- package/dist/utility/lmdb/deleteUtility.js +115 -0
- package/dist/utility/lmdb/deleteUtility.js.map +1 -0
- package/dist/utility/lmdb/environmentUtility.d.ts +81 -0
- package/dist/utility/lmdb/environmentUtility.js +432 -0
- package/dist/utility/lmdb/environmentUtility.js.map +1 -0
- package/dist/utility/lmdb/searchCursorFunctions.d.ts +93 -0
- package/dist/utility/lmdb/searchCursorFunctions.js +174 -0
- package/dist/utility/lmdb/searchCursorFunctions.js.map +1 -0
- package/dist/utility/lmdb/searchUtility.d.ts +204 -0
- package/dist/utility/lmdb/searchUtility.js +724 -0
- package/dist/utility/lmdb/searchUtility.js.map +1 -0
- package/dist/utility/lmdb/terms.d.ts +34 -0
- package/dist/utility/lmdb/terms.js +52 -0
- package/dist/utility/lmdb/terms.js.map +1 -0
- package/dist/utility/lmdb/writeUtility.d.ts +32 -0
- package/dist/utility/lmdb/writeUtility.js +360 -0
- package/dist/utility/lmdb/writeUtility.js.map +1 -0
- package/dist/utility/logging/harper_logger.d.ts +141 -0
- package/dist/utility/logging/harper_logger.js +862 -0
- package/dist/utility/logging/harper_logger.js.map +1 -0
- package/dist/utility/logging/logRotator.d.ts +19 -0
- package/dist/utility/logging/logRotator.js +146 -0
- package/dist/utility/logging/logRotator.js.map +1 -0
- package/dist/utility/logging/logger.d.ts +11 -0
- package/dist/utility/logging/logger.js +19 -0
- package/dist/utility/logging/logger.js.map +1 -0
- package/dist/utility/logging/readLog.d.ts +8 -0
- package/dist/utility/logging/readLog.js +339 -0
- package/dist/utility/logging/readLog.js.map +1 -0
- package/dist/utility/logging/transactionLog.d.ts +8 -0
- package/dist/utility/logging/transactionLog.js +46 -0
- package/dist/utility/logging/transactionLog.js.map +1 -0
- package/dist/utility/mount_hdb.d.ts +2 -0
- package/dist/utility/mount_hdb.js +51 -0
- package/dist/utility/mount_hdb.js.map +1 -0
- package/dist/utility/npmUtilities.d.ts +6 -0
- package/dist/utility/npmUtilities.js +91 -0
- package/dist/utility/npmUtilities.js.map +1 -0
- package/dist/utility/operationPermissions.d.ts +36 -0
- package/dist/utility/operationPermissions.js +116 -0
- package/dist/utility/operationPermissions.js.map +1 -0
- package/dist/utility/operation_authorization.d.ts +18 -0
- package/dist/utility/operation_authorization.js +667 -0
- package/dist/utility/operation_authorization.js.map +1 -0
- package/dist/utility/packageUtils.d.ts +9 -0
- package/dist/utility/packageUtils.js +52 -0
- package/dist/utility/packageUtils.js.map +1 -0
- package/dist/utility/password.d.ts +20 -0
- package/dist/utility/password.js +119 -0
- package/dist/utility/password.js.map +1 -0
- package/dist/utility/processManagement/processManagement.d.ts +35 -0
- package/dist/utility/processManagement/processManagement.js +188 -0
- package/dist/utility/processManagement/processManagement.js.map +1 -0
- package/dist/utility/processManagement/servicesConfig.d.ts +29 -0
- package/dist/utility/processManagement/servicesConfig.js +52 -0
- package/dist/utility/processManagement/servicesConfig.js.map +1 -0
- package/dist/utility/scripts/restartHdb.d.ts +1 -0
- package/dist/utility/scripts/restartHdb.js +23 -0
- package/dist/utility/scripts/restartHdb.js.map +1 -0
- package/dist/utility/signalling.d.ts +2 -0
- package/dist/utility/signalling.js +35 -0
- package/dist/utility/signalling.js.map +1 -0
- package/dist/utility/terms/certificates.d.ts +46 -0
- package/dist/utility/terms/certificates.js +65 -0
- package/dist/utility/terms/certificates.js.map +1 -0
- package/dist/utility/when.d.ts +3 -0
- package/dist/utility/when.js +18 -0
- package/dist/utility/when.js.map +1 -0
- package/dist/validation/bulkDeleteValidator.d.ts +2 -0
- package/dist/validation/bulkDeleteValidator.js +21 -0
- package/dist/validation/bulkDeleteValidator.js.map +1 -0
- package/dist/validation/check_permissions.d.ts +2 -0
- package/dist/validation/check_permissions.js +20 -0
- package/dist/validation/check_permissions.js.map +1 -0
- package/dist/validation/common_validators.d.ts +19 -0
- package/dist/validation/common_validators.js +76 -0
- package/dist/validation/common_validators.js.map +1 -0
- package/dist/validation/configValidator.d.ts +8 -0
- package/dist/validation/configValidator.js +292 -0
- package/dist/validation/configValidator.js.map +1 -0
- package/dist/validation/deleteValidator.d.ts +2 -0
- package/dist/validation/deleteValidator.js +15 -0
- package/dist/validation/deleteValidator.js.map +1 -0
- package/dist/validation/fileLoadValidator.d.ts +4 -0
- package/dist/validation/fileLoadValidator.js +138 -0
- package/dist/validation/fileLoadValidator.js.map +1 -0
- package/dist/validation/insertValidator.d.ts +2 -0
- package/dist/validation/insertValidator.js +38 -0
- package/dist/validation/insertValidator.js.map +1 -0
- package/dist/validation/installValidator.d.ts +7 -0
- package/dist/validation/installValidator.js +28 -0
- package/dist/validation/installValidator.js.map +1 -0
- package/dist/validation/readLogValidator.d.ts +2 -0
- package/dist/validation/readLogValidator.js +48 -0
- package/dist/validation/readLogValidator.js.map +1 -0
- package/dist/validation/role_validation.d.ts +3 -0
- package/dist/validation/role_validation.js +284 -0
- package/dist/validation/role_validation.js.map +1 -0
- package/dist/validation/schemaMetadataValidator.d.ts +16 -0
- package/dist/validation/schemaMetadataValidator.js +38 -0
- package/dist/validation/schemaMetadataValidator.js.map +1 -0
- package/dist/validation/searchValidator.d.ts +2 -0
- package/dist/validation/searchValidator.js +141 -0
- package/dist/validation/searchValidator.js.map +1 -0
- package/dist/validation/statusValidator.d.ts +19 -0
- package/dist/validation/statusValidator.js +95 -0
- package/dist/validation/statusValidator.js.map +1 -0
- package/dist/validation/transactionLogValidator.d.ts +2 -0
- package/dist/validation/transactionLogValidator.js +28 -0
- package/dist/validation/transactionLogValidator.js.map +1 -0
- package/dist/validation/user_validation.d.ts +3 -0
- package/dist/validation/user_validation.js +52 -0
- package/dist/validation/user_validation.js.map +1 -0
- package/dist/validation/validationWrapper.d.ts +15 -0
- package/dist/validation/validationWrapper.js +95 -0
- package/dist/validation/validationWrapper.js.map +1 -0
- package/package.json +225 -0
- package/static/README.md +13 -0
- package/static/ascii_logo.txt +21 -0
- package/static/defaultConfig.yaml +75 -0
|
@@ -0,0 +1,822 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.analyticsDelay = void 0;
|
|
40
|
+
exports.setAnalyticsEnabled = setAnalyticsEnabled;
|
|
41
|
+
exports.recordAction = recordAction;
|
|
42
|
+
exports.recordActionBinary = recordActionBinary;
|
|
43
|
+
exports.addAnalyticsListener = addAnalyticsListener;
|
|
44
|
+
exports.recordHostname = recordHostname;
|
|
45
|
+
exports.calculateCPUUtilization = calculateCPUUtilization;
|
|
46
|
+
exports.diffResourceUsage = diffResourceUsage;
|
|
47
|
+
exports.onAnalyticsAggregate = onAnalyticsAggregate;
|
|
48
|
+
const worker_threads_1 = require("worker_threads");
|
|
49
|
+
const manageThreads_js_1 = require("../../server/threads/manageThreads.js");
|
|
50
|
+
const databases_ts_1 = require("../databases.js");
|
|
51
|
+
const harper_logger_js_1 = __importDefault(require("../../utility/logging/harper_logger.js"));
|
|
52
|
+
const promises_1 = require("node:fs/promises");
|
|
53
|
+
const { getLogFilePath, forComponent } = harper_logger_js_1.default;
|
|
54
|
+
const path_1 = require("path");
|
|
55
|
+
const promises_2 = require("fs/promises");
|
|
56
|
+
const commonUtility_js_1 = require("../../utility/lmdb/commonUtility.js");
|
|
57
|
+
const environmentManager_js_1 = require("../../utility/environment/environmentManager.js");
|
|
58
|
+
const hdbTerms_ts_1 = require("../../utility/hdbTerms.js");
|
|
59
|
+
const Server_ts_1 = require("../../server/Server.js");
|
|
60
|
+
const fs = __importStar(require("node:fs"));
|
|
61
|
+
const hostnames_ts_1 = require("./hostnames.js");
|
|
62
|
+
const metadata_ts_1 = require("./metadata.js");
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
// let everything load before we actually load and start the profiler
|
|
65
|
+
import("./profile.js");
|
|
66
|
+
}, 1000);
|
|
67
|
+
const rocksdb_js_1 = require("@harperfast/rocksdb-js");
|
|
68
|
+
const log = forComponent('analytics').conditional;
|
|
69
|
+
(0, environmentManager_js_1.initSync)();
|
|
70
|
+
let activeActions = new Map();
|
|
71
|
+
let analyticsEnabled = (0, environmentManager_js_1.get)(hdbTerms_ts_1.CONFIG_PARAMS.ANALYTICS_AGGREGATEPERIOD) > -1;
|
|
72
|
+
let sendAnalyticsTimeout;
|
|
73
|
+
function setAnalyticsEnabled(enabled) {
|
|
74
|
+
analyticsEnabled = enabled;
|
|
75
|
+
clearTimeout(sendAnalyticsTimeout); // reset this
|
|
76
|
+
sendAnalyticsTimeout = null;
|
|
77
|
+
}
|
|
78
|
+
function recordExistingAction(value, action) {
|
|
79
|
+
if (typeof value === 'number') {
|
|
80
|
+
let values = action.values;
|
|
81
|
+
const index = values.index++;
|
|
82
|
+
if (index >= values.length) {
|
|
83
|
+
const oldValues = values;
|
|
84
|
+
action.values = values = new Float32Array(index * 2);
|
|
85
|
+
values.set(oldValues);
|
|
86
|
+
values.index = index + 1;
|
|
87
|
+
}
|
|
88
|
+
values[index] = value;
|
|
89
|
+
action.total += value;
|
|
90
|
+
}
|
|
91
|
+
else if (typeof value === 'boolean') {
|
|
92
|
+
if (value)
|
|
93
|
+
action.total++;
|
|
94
|
+
action.count++;
|
|
95
|
+
}
|
|
96
|
+
else if (typeof value === 'function') {
|
|
97
|
+
// nothing to do except wait for the callback
|
|
98
|
+
action.count++;
|
|
99
|
+
}
|
|
100
|
+
else
|
|
101
|
+
throw new TypeError('Invalid metric value type ' + typeof value);
|
|
102
|
+
}
|
|
103
|
+
function recordNewAction(key, value, metric, path, method, type) {
|
|
104
|
+
const action = {};
|
|
105
|
+
if (typeof value === 'number') {
|
|
106
|
+
action.total = value;
|
|
107
|
+
action.values = new Float32Array(4);
|
|
108
|
+
action.values.index = 1;
|
|
109
|
+
action.values[0] = value;
|
|
110
|
+
action.total = value;
|
|
111
|
+
}
|
|
112
|
+
else if (typeof value === 'boolean') {
|
|
113
|
+
action.total = value ? 1 : 0;
|
|
114
|
+
action.count = 1;
|
|
115
|
+
}
|
|
116
|
+
else if (typeof value === 'function') {
|
|
117
|
+
action.count = 1;
|
|
118
|
+
action.callback = value;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
throw new TypeError('Invalid metric value type ' + typeof value);
|
|
122
|
+
}
|
|
123
|
+
action.description = {
|
|
124
|
+
metric,
|
|
125
|
+
path,
|
|
126
|
+
method,
|
|
127
|
+
type,
|
|
128
|
+
};
|
|
129
|
+
activeActions.set(key, action);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Record an action for analytics (like an HTTP request, replication, MQTT message)
|
|
133
|
+
* @param value
|
|
134
|
+
* @param metric
|
|
135
|
+
* @param path
|
|
136
|
+
* @param method
|
|
137
|
+
* @param type
|
|
138
|
+
*/
|
|
139
|
+
function recordAction(value, metric, path, method, type) {
|
|
140
|
+
if (!analyticsEnabled)
|
|
141
|
+
return;
|
|
142
|
+
// TODO: May want to consider nested paths, as they may yield faster hashing of (fixed) strings that hashing concatenated strings
|
|
143
|
+
let key = metric + (path ? '-' + path : '');
|
|
144
|
+
if (method !== undefined)
|
|
145
|
+
key += '-' + method;
|
|
146
|
+
if (type !== undefined)
|
|
147
|
+
key += '-' + type;
|
|
148
|
+
const action = activeActions.get(key);
|
|
149
|
+
if (action) {
|
|
150
|
+
recordExistingAction(value, action);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
recordNewAction(key, value, metric, path, method, type);
|
|
154
|
+
}
|
|
155
|
+
if (!sendAnalyticsTimeout)
|
|
156
|
+
sendAnalytics();
|
|
157
|
+
}
|
|
158
|
+
Server_ts_1.server.recordAnalytics = recordAction;
|
|
159
|
+
function recordActionBinary(value, metric, path, method, type) {
|
|
160
|
+
recordAction(Boolean(value), metric, path, method, type);
|
|
161
|
+
}
|
|
162
|
+
let analyticsStart = 0;
|
|
163
|
+
exports.analyticsDelay = 1000;
|
|
164
|
+
const ANALYTICS_REPORT_TYPE = 'analytics-report';
|
|
165
|
+
const analyticsListeners = [];
|
|
166
|
+
const analyticsAggregateListeners = [];
|
|
167
|
+
function addAnalyticsListener(callback) {
|
|
168
|
+
analyticsListeners.push(callback);
|
|
169
|
+
}
|
|
170
|
+
const IDEAL_PERCENTILES = [0.01, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999, 1];
|
|
171
|
+
/**
|
|
172
|
+
* Periodically send analytics data back to the main thread for storage
|
|
173
|
+
*/
|
|
174
|
+
function sendAnalytics() {
|
|
175
|
+
analyticsStart ||= performance.now();
|
|
176
|
+
sendAnalyticsTimeout = setTimeout(async () => {
|
|
177
|
+
sendAnalyticsTimeout = null;
|
|
178
|
+
const period = performance.now() - analyticsStart;
|
|
179
|
+
analyticsStart = 0;
|
|
180
|
+
const metrics = [];
|
|
181
|
+
const report = {
|
|
182
|
+
time: Date.now(),
|
|
183
|
+
period,
|
|
184
|
+
threadId: worker_threads_1.threadId,
|
|
185
|
+
metrics,
|
|
186
|
+
};
|
|
187
|
+
for (const [_name, action] of activeActions) {
|
|
188
|
+
if (action.values) {
|
|
189
|
+
const values = action.values.subarray(0, action.values.index);
|
|
190
|
+
values.sort();
|
|
191
|
+
const count = values.length;
|
|
192
|
+
// compute the stats
|
|
193
|
+
let lastUpperBound = 0;
|
|
194
|
+
const distribution = [];
|
|
195
|
+
let lastValue;
|
|
196
|
+
for (const percentile of IDEAL_PERCENTILES) {
|
|
197
|
+
const upperBound = Math.floor(count * percentile);
|
|
198
|
+
const value = values[upperBound - 1];
|
|
199
|
+
if (upperBound > lastUpperBound) {
|
|
200
|
+
const count = upperBound - lastUpperBound;
|
|
201
|
+
if (value === lastValue) {
|
|
202
|
+
const entry = distribution[distribution.length - 1];
|
|
203
|
+
if (typeof entry === 'number')
|
|
204
|
+
distribution[distribution.length - 1] = { value: entry, count: 1 + count };
|
|
205
|
+
else
|
|
206
|
+
entry.count += count;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
distribution.push(count > 1 ? { value, count } : value);
|
|
210
|
+
lastValue = value;
|
|
211
|
+
}
|
|
212
|
+
lastUpperBound = upperBound;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
metrics.push(Object.assign(action.description, {
|
|
216
|
+
mean: action.total / count,
|
|
217
|
+
distribution,
|
|
218
|
+
count,
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
else if (action.callback) {
|
|
222
|
+
metrics.push(Object.assign(action.description, action.callback(action)));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
metrics.push(Object.assign(action.description, {
|
|
226
|
+
total: action.total,
|
|
227
|
+
count: action.count,
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
await rest(); // sort's are expensive and we don't want to do two of them in the same event turn
|
|
231
|
+
}
|
|
232
|
+
const memoryUsage = process.memoryUsage();
|
|
233
|
+
metrics.push({
|
|
234
|
+
metric: 'memory',
|
|
235
|
+
threadId: worker_threads_1.threadId,
|
|
236
|
+
byThread: true,
|
|
237
|
+
...memoryUsage,
|
|
238
|
+
});
|
|
239
|
+
for (const listener of analyticsListeners) {
|
|
240
|
+
listener(metrics);
|
|
241
|
+
}
|
|
242
|
+
activeActions = new Map();
|
|
243
|
+
if (worker_threads_1.parentPort)
|
|
244
|
+
worker_threads_1.parentPort.postMessage({
|
|
245
|
+
type: ANALYTICS_REPORT_TYPE,
|
|
246
|
+
report,
|
|
247
|
+
});
|
|
248
|
+
else
|
|
249
|
+
recordAnalytics({ report });
|
|
250
|
+
}, exports.analyticsDelay).unref();
|
|
251
|
+
}
|
|
252
|
+
async function recordHostname() {
|
|
253
|
+
const hostname = Server_ts_1.server.hostname;
|
|
254
|
+
log.trace?.('recordHostname server.hostname:', hostname);
|
|
255
|
+
const nodeId = (0, hostnames_ts_1.stableNodeId)(hostname);
|
|
256
|
+
log.trace?.('recordHostname nodeId:', nodeId);
|
|
257
|
+
const hostnamesTable = (0, hostnames_ts_1.getAnalyticsHostnameTable)();
|
|
258
|
+
const record = await hostnamesTable.get(nodeId);
|
|
259
|
+
if (!record) {
|
|
260
|
+
const hostnameRecord = {
|
|
261
|
+
id: nodeId,
|
|
262
|
+
hostname,
|
|
263
|
+
};
|
|
264
|
+
log.trace?.(`recordHostname storing hostname: ${JSON.stringify(hostnameRecord)}`);
|
|
265
|
+
hostnamesTable.put(hostnameRecord.id, hostnameRecord);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function getHostNodeId(hostname) {
|
|
269
|
+
let nodeId = hostnames_ts_1.nodeIds.get(hostname);
|
|
270
|
+
if (nodeId) {
|
|
271
|
+
log.trace?.('storeMetric cached nodeId:', nodeId);
|
|
272
|
+
return nodeId;
|
|
273
|
+
}
|
|
274
|
+
nodeId = (0, hostnames_ts_1.stableNodeId)(hostname);
|
|
275
|
+
log.trace?.('storeMetric new nodeId:', nodeId);
|
|
276
|
+
hostnames_ts_1.nodeIds.set(hostname, nodeId);
|
|
277
|
+
return nodeId;
|
|
278
|
+
}
|
|
279
|
+
function storeMetric(table, metric) {
|
|
280
|
+
const nodeId = getHostNodeId(Server_ts_1.server.hostname);
|
|
281
|
+
const metricValue = {
|
|
282
|
+
id: [(0, commonUtility_js_1.getNextMonotonicTime)(), nodeId],
|
|
283
|
+
...metric,
|
|
284
|
+
};
|
|
285
|
+
log.trace?.(`storing metric ${JSON.stringify(metricValue)}`);
|
|
286
|
+
table.put(metricValue.id, metricValue);
|
|
287
|
+
}
|
|
288
|
+
/** calculateCPUUtilization takes a ResourceUsage with at least userCPUTime &
|
|
289
|
+
* systemCPUTime set with millisecond values and a time period in milliseconds
|
|
290
|
+
* and returns the percentage of that time the CPU was being utilized as a
|
|
291
|
+
* decimal value between 0 and 1. So for example, 50% utilization will be
|
|
292
|
+
* returned as 0.5.
|
|
293
|
+
*/
|
|
294
|
+
function calculateCPUUtilization(resourceUsage, period) {
|
|
295
|
+
const cpuTime = resourceUsage.userCPUTime + resourceUsage.systemCPUTime;
|
|
296
|
+
log.trace?.(`calculateCPUUtilization cpuTime: ${cpuTime} period: ${period}`);
|
|
297
|
+
return Math.round((cpuTime / period) * 100) / 100;
|
|
298
|
+
}
|
|
299
|
+
/** diffResourceUsage takes a ResourceUsage representing the last time we stored them and a new
|
|
300
|
+
* process.resourceUsage() return value and normalizes and diffs the two values to return the
|
|
301
|
+
* new values for this time period.
|
|
302
|
+
*/
|
|
303
|
+
function diffResourceUsage(lastResourceUsage, resourceUsage) {
|
|
304
|
+
return {
|
|
305
|
+
userCPUTime: resourceUsage.userCPUTime - (lastResourceUsage?.userCPUTime ?? 0),
|
|
306
|
+
systemCPUTime: resourceUsage.systemCPUTime - (lastResourceUsage?.systemCPUTime ?? 0),
|
|
307
|
+
minorPageFault: resourceUsage.minorPageFault - (lastResourceUsage?.minorPageFault ?? 0),
|
|
308
|
+
majorPageFault: resourceUsage.majorPageFault - (lastResourceUsage?.majorPageFault ?? 0),
|
|
309
|
+
fsRead: resourceUsage.fsRead - (lastResourceUsage?.fsRead ?? 0),
|
|
310
|
+
fsWrite: resourceUsage.fsWrite - (lastResourceUsage?.fsWrite ?? 0),
|
|
311
|
+
voluntaryContextSwitches: resourceUsage.voluntaryContextSwitches - (lastResourceUsage?.voluntaryContextSwitches ?? 0),
|
|
312
|
+
involuntaryContextSwitches: resourceUsage.involuntaryContextSwitches - (lastResourceUsage?.involuntaryContextSwitches ?? 0),
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
/** storeTableSizeMetrics returns the cumulative size of the tables
|
|
316
|
+
*/
|
|
317
|
+
function storeTableSizeMetrics(analyticsTable, dbName, tables) {
|
|
318
|
+
let dbUsedSize = 0;
|
|
319
|
+
for (const [tableName, table] of Object.entries(tables)) {
|
|
320
|
+
const fullTableName = `${dbName}.${tableName}`;
|
|
321
|
+
const tableSize = table.getSize();
|
|
322
|
+
const metric = {
|
|
323
|
+
metric: metadata_ts_1.METRIC.TABLE_SIZE,
|
|
324
|
+
database: dbName,
|
|
325
|
+
table: tableName,
|
|
326
|
+
size: tableSize,
|
|
327
|
+
};
|
|
328
|
+
log.trace?.(`table ${fullTableName} size metric: ${JSON.stringify(metric)}`);
|
|
329
|
+
storeMetric(analyticsTable, metric);
|
|
330
|
+
dbUsedSize += tableSize;
|
|
331
|
+
}
|
|
332
|
+
return dbUsedSize;
|
|
333
|
+
}
|
|
334
|
+
function storeDBSizeMetrics(analyticsTable, databases) {
|
|
335
|
+
for (const [db, tables] of Object.entries(databases)) {
|
|
336
|
+
try {
|
|
337
|
+
const [firstTable] = Object.values(tables);
|
|
338
|
+
const dbAuditSize = firstTable?.getAuditSize();
|
|
339
|
+
if (!dbAuditSize) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
let metric;
|
|
343
|
+
if (firstTable.primaryStore instanceof rocksdb_js_1.RocksDatabase) {
|
|
344
|
+
const dbPath = firstTable.primaryStore.path;
|
|
345
|
+
let dbSize = 0;
|
|
346
|
+
for (const filename of fs.readdirSync(dbPath)) {
|
|
347
|
+
if (filename.endsWith('.sst')) {
|
|
348
|
+
dbSize += fs.statSync((0, path_1.join)(dbPath, filename)).size;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
metric = {
|
|
352
|
+
metric: metadata_ts_1.METRIC.DATABASE_SIZE,
|
|
353
|
+
database: db,
|
|
354
|
+
size: dbSize,
|
|
355
|
+
transactionLog: dbAuditSize,
|
|
356
|
+
};
|
|
357
|
+
storeMetric(analyticsTable, metric);
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
const dbTotalSize = fs.statSync(firstTable.primaryStore.path).size;
|
|
361
|
+
const dbUsedSize = storeTableSizeMetrics(analyticsTable, db, tables);
|
|
362
|
+
const dbFree = dbTotalSize - dbUsedSize;
|
|
363
|
+
metric = {
|
|
364
|
+
metric: metadata_ts_1.METRIC.DATABASE_SIZE,
|
|
365
|
+
database: db,
|
|
366
|
+
size: dbTotalSize,
|
|
367
|
+
used: dbUsedSize,
|
|
368
|
+
free: dbFree,
|
|
369
|
+
audit: dbAuditSize,
|
|
370
|
+
};
|
|
371
|
+
storeMetric(analyticsTable, metric);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
// a table or db was deleted, could get an error here
|
|
376
|
+
log.warn?.(`Error getting DB size metrics`, error);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function storeVolumeMetrics(analyticsTable, databases) {
|
|
381
|
+
for (const [db, tables] of Object.entries(databases)) {
|
|
382
|
+
try {
|
|
383
|
+
const [firstTable] = Object.values(tables);
|
|
384
|
+
const storageStats = firstTable?.getStorageStats();
|
|
385
|
+
if (!storageStats) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
const metric = {
|
|
389
|
+
metric: metadata_ts_1.METRIC.STORAGE_VOLUME,
|
|
390
|
+
database: db,
|
|
391
|
+
...storageStats,
|
|
392
|
+
};
|
|
393
|
+
storeMetric(analyticsTable, metric);
|
|
394
|
+
log.trace?.(`db ${db} storage volume metrics: ${JSON.stringify(metric)}`);
|
|
395
|
+
}
|
|
396
|
+
catch (error) {
|
|
397
|
+
// a table or db was deleted, could get an error here
|
|
398
|
+
log.warn?.(`Error getting DB volume metrics`, error);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
async function aggregation(fromPeriod, toPeriod = 60000) {
|
|
403
|
+
const rawAnalyticsTable = getRawAnalyticsTable();
|
|
404
|
+
const analyticsTable = getAnalyticsTable();
|
|
405
|
+
const taskQueueLatency = (async () => {
|
|
406
|
+
const start = performance.now();
|
|
407
|
+
// measure how long it takes to enqueue and get a callback from a simple/fast task:
|
|
408
|
+
await (0, promises_1.stat)(getLogFilePath());
|
|
409
|
+
const delay = performance.now() - start;
|
|
410
|
+
if (delay > 5000) {
|
|
411
|
+
log.warn?.('Unusually high task queue latency on the main thread of ' + Math.round(now - start) + 'ms');
|
|
412
|
+
}
|
|
413
|
+
return delay;
|
|
414
|
+
})();
|
|
415
|
+
let lastForPeriod;
|
|
416
|
+
const localNodeId = getHostNodeId(Server_ts_1.server.hostname);
|
|
417
|
+
// find the last entry for this period for the local node only
|
|
418
|
+
for (const entry of analyticsTable.primaryStore.getRange({
|
|
419
|
+
start: Infinity,
|
|
420
|
+
end: false,
|
|
421
|
+
reverse: true,
|
|
422
|
+
})) {
|
|
423
|
+
if (!entry.value?.time || entry.value?.id[1] !== localNodeId)
|
|
424
|
+
continue;
|
|
425
|
+
lastForPeriod = entry.value.time;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
// was the last aggregation too recent to calculate a whole period?
|
|
429
|
+
if (Date.now() - toPeriod < lastForPeriod)
|
|
430
|
+
return;
|
|
431
|
+
let firstForPeriod;
|
|
432
|
+
const aggregateActions = new Map();
|
|
433
|
+
const distributions = new Map();
|
|
434
|
+
const threadsToAverage = [];
|
|
435
|
+
let lastTime;
|
|
436
|
+
for (const { key, value } of rawAnalyticsTable.primaryStore.getRange({
|
|
437
|
+
start: lastForPeriod || false,
|
|
438
|
+
exclusiveStart: true,
|
|
439
|
+
end: Infinity,
|
|
440
|
+
})) {
|
|
441
|
+
if (!value)
|
|
442
|
+
continue;
|
|
443
|
+
if (firstForPeriod) {
|
|
444
|
+
if (key > firstForPeriod + toPeriod)
|
|
445
|
+
break; // outside the period of interest
|
|
446
|
+
}
|
|
447
|
+
else
|
|
448
|
+
firstForPeriod = key;
|
|
449
|
+
lastTime = key;
|
|
450
|
+
const { metrics, threadId } = value;
|
|
451
|
+
for (const entry of metrics || []) {
|
|
452
|
+
// eslint-disable-next-line no-unused-vars
|
|
453
|
+
let { path, method, type, metric, count, total, distribution, threads, ...measures } = entry;
|
|
454
|
+
if (!count)
|
|
455
|
+
count = 1;
|
|
456
|
+
let key = metric + (path ? '-' + path : '');
|
|
457
|
+
if (method !== undefined)
|
|
458
|
+
key += '-' + method;
|
|
459
|
+
if (type !== undefined)
|
|
460
|
+
key += '-' + type;
|
|
461
|
+
let action = aggregateActions.get(key);
|
|
462
|
+
if (action) {
|
|
463
|
+
if (action.threads) {
|
|
464
|
+
const actionForThread = action.threads[threadId];
|
|
465
|
+
if (actionForThread)
|
|
466
|
+
action = actionForThread;
|
|
467
|
+
else {
|
|
468
|
+
action.threads[threadId] = { ...measures };
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
if (!action.count)
|
|
473
|
+
action.count = 1;
|
|
474
|
+
const previousCount = action.count;
|
|
475
|
+
for (const measureName in measures) {
|
|
476
|
+
const value = measures[measureName];
|
|
477
|
+
if (typeof value === 'number') {
|
|
478
|
+
action[measureName] = (action[measureName] * previousCount + value * count) / (previousCount + count);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
action.count += count;
|
|
482
|
+
if (total >= 0) {
|
|
483
|
+
action.total += total;
|
|
484
|
+
action.ratio = action.total / action.count;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
action = { period: toPeriod, ...entry };
|
|
489
|
+
delete action.distribution;
|
|
490
|
+
aggregateActions.set(key, action);
|
|
491
|
+
if (action.byThread) {
|
|
492
|
+
action.threads = [];
|
|
493
|
+
action.threads[threadId] = { ...measures };
|
|
494
|
+
threadsToAverage.push(action);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (distribution) {
|
|
498
|
+
distribution = distribution.map((entry) => (typeof entry === 'number' ? { value: entry, count: 1 } : entry));
|
|
499
|
+
const existingDistribution = distributions.get(key);
|
|
500
|
+
if (!existingDistribution)
|
|
501
|
+
distributions.set(key, distribution);
|
|
502
|
+
else {
|
|
503
|
+
existingDistribution.push(...distribution);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
await rest();
|
|
508
|
+
}
|
|
509
|
+
for (const entry of threadsToAverage) {
|
|
510
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars,prefer-const
|
|
511
|
+
let { path, method, type, metric, count, total, distribution, threads, ...measures } = entry;
|
|
512
|
+
threads = threads.filter((thread) => thread);
|
|
513
|
+
for (const measureName in measures) {
|
|
514
|
+
if (typeof entry[measureName] !== 'number')
|
|
515
|
+
continue;
|
|
516
|
+
let total = 0;
|
|
517
|
+
for (const thread of threads) {
|
|
518
|
+
const value = thread[measureName];
|
|
519
|
+
if (typeof value === 'number') {
|
|
520
|
+
total += value;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
entry[measureName] = total;
|
|
524
|
+
}
|
|
525
|
+
entry.count = threads.length;
|
|
526
|
+
delete entry.threads;
|
|
527
|
+
delete entry.byThread;
|
|
528
|
+
}
|
|
529
|
+
for (const [key, distribution] of distributions) {
|
|
530
|
+
// now iterate through the distributions finding the close bin to each percentile and interpolating the position in that bin
|
|
531
|
+
const action = aggregateActions.get(key);
|
|
532
|
+
distribution.sort((a, b) => (a.value > b.value ? 1 : -1));
|
|
533
|
+
const count = action.count - 1;
|
|
534
|
+
const percentiles = [];
|
|
535
|
+
let countPosition = 0;
|
|
536
|
+
let index = 0;
|
|
537
|
+
let bin;
|
|
538
|
+
for (const percentile of IDEAL_PERCENTILES) {
|
|
539
|
+
const nextTargetCount = count * percentile;
|
|
540
|
+
while (countPosition < nextTargetCount) {
|
|
541
|
+
bin = distribution[index++];
|
|
542
|
+
countPosition += bin.count;
|
|
543
|
+
// we decrement these counts so we are skipping the minimum value in our interpolation
|
|
544
|
+
if (index === 1)
|
|
545
|
+
countPosition--;
|
|
546
|
+
}
|
|
547
|
+
const previousBin = distribution[index > 1 ? index - 2 : 0];
|
|
548
|
+
if (!bin)
|
|
549
|
+
bin = distribution[0];
|
|
550
|
+
percentiles.push(bin.value - ((bin.value - previousBin.value) * (countPosition - nextTargetCount)) / bin.count);
|
|
551
|
+
}
|
|
552
|
+
const [p1, p10, p25, median, p75, p90, p95, p99, p999] = percentiles;
|
|
553
|
+
Object.assign(action, { p1, p10, p25, median, p75, p90, p95, p99, p999 });
|
|
554
|
+
}
|
|
555
|
+
let hasUpdates;
|
|
556
|
+
for (const [, value] of aggregateActions) {
|
|
557
|
+
value.time = lastTime;
|
|
558
|
+
storeMetric(analyticsTable, value);
|
|
559
|
+
hasUpdates = true;
|
|
560
|
+
}
|
|
561
|
+
if (hasUpdates) {
|
|
562
|
+
for (const listener of analyticsAggregateListeners) {
|
|
563
|
+
listener(aggregateActions.values());
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const now = Date.now();
|
|
567
|
+
const { idle, active } = performance.eventLoopUtilization();
|
|
568
|
+
// don't record boring entries
|
|
569
|
+
if (hasUpdates || active * 10 > idle) {
|
|
570
|
+
const value = {
|
|
571
|
+
metric: metadata_ts_1.METRIC.MAIN_THREAD_UTILIZATION,
|
|
572
|
+
idle: idle - lastIdle,
|
|
573
|
+
active: active - lastActive,
|
|
574
|
+
taskQueueLatency: await taskQueueLatency,
|
|
575
|
+
time: now,
|
|
576
|
+
...process.memoryUsage(),
|
|
577
|
+
};
|
|
578
|
+
storeMetric(analyticsTable, value);
|
|
579
|
+
}
|
|
580
|
+
lastIdle = idle;
|
|
581
|
+
lastActive = active;
|
|
582
|
+
// resource-usage metrics
|
|
583
|
+
const resourceUsage = process.resourceUsage();
|
|
584
|
+
resourceUsage.time = now;
|
|
585
|
+
// normalize to milliseconds
|
|
586
|
+
resourceUsage.userCPUTime = resourceUsage.userCPUTime / 1000;
|
|
587
|
+
resourceUsage.systemCPUTime = resourceUsage.systemCPUTime / 1000;
|
|
588
|
+
log.trace?.(`process.resourceUsage: ${JSON.stringify(resourceUsage)}`);
|
|
589
|
+
const currentResourceUsage = diffResourceUsage(lastResourceUsage, resourceUsage);
|
|
590
|
+
log.trace?.(`diffed resourceUsage: ${JSON.stringify(currentResourceUsage)}`);
|
|
591
|
+
currentResourceUsage.time = now;
|
|
592
|
+
currentResourceUsage.period = lastResourceUsage.time ? now - lastResourceUsage.time : toPeriod;
|
|
593
|
+
currentResourceUsage.cpuUtilization = calculateCPUUtilization(currentResourceUsage, currentResourceUsage.period);
|
|
594
|
+
const cruMetric = {
|
|
595
|
+
metric: metadata_ts_1.METRIC.RESOURCE_USAGE,
|
|
596
|
+
...currentResourceUsage,
|
|
597
|
+
};
|
|
598
|
+
storeMetric(analyticsTable, cruMetric);
|
|
599
|
+
lastResourceUsage = resourceUsage;
|
|
600
|
+
// database-size & table-size metrics
|
|
601
|
+
const databases = (0, databases_ts_1.getDatabases)();
|
|
602
|
+
storeDBSizeMetrics(analyticsTable, databases);
|
|
603
|
+
storeDBSizeMetrics(analyticsTable, { system: databases.system });
|
|
604
|
+
// database storage volume metrics
|
|
605
|
+
storeVolumeMetrics(analyticsTable, databases);
|
|
606
|
+
storeVolumeMetrics(analyticsTable, { system: databases.system });
|
|
607
|
+
}
|
|
608
|
+
let lastIdle = 0;
|
|
609
|
+
let lastActive = 0;
|
|
610
|
+
let lastResourceUsage = {
|
|
611
|
+
userCPUTime: 0,
|
|
612
|
+
systemCPUTime: 0,
|
|
613
|
+
};
|
|
614
|
+
const rest = () => new Promise(setImmediate);
|
|
615
|
+
async function cleanup(AnalyticsTable, expiration) {
|
|
616
|
+
const end = Date.now() - expiration;
|
|
617
|
+
for (const key of AnalyticsTable.primaryStore.getKeys({ start: false, end })) {
|
|
618
|
+
AnalyticsTable.primaryStore.remove(key);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
const RAW_EXPIRATION = 3600000;
|
|
622
|
+
const AGGREGATE_EXPIRATION = 31536000000; // one year
|
|
623
|
+
let RawAnalyticsTable;
|
|
624
|
+
function getRawAnalyticsTable() {
|
|
625
|
+
return (RawAnalyticsTable ||
|
|
626
|
+
(RawAnalyticsTable = (0, databases_ts_1.table)({
|
|
627
|
+
table: 'hdb_raw_analytics',
|
|
628
|
+
database: 'system',
|
|
629
|
+
audit: false,
|
|
630
|
+
trackDeletes: false,
|
|
631
|
+
attributes: [
|
|
632
|
+
{
|
|
633
|
+
name: 'id',
|
|
634
|
+
isPrimaryKey: true,
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: 'action',
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
name: 'metrics',
|
|
641
|
+
},
|
|
642
|
+
],
|
|
643
|
+
})));
|
|
644
|
+
}
|
|
645
|
+
let AnalyticsTable;
|
|
646
|
+
function getAnalyticsTable() {
|
|
647
|
+
return (AnalyticsTable ||
|
|
648
|
+
(AnalyticsTable = (0, databases_ts_1.table)({
|
|
649
|
+
table: 'hdb_analytics',
|
|
650
|
+
database: 'system',
|
|
651
|
+
audit: true,
|
|
652
|
+
trackDeletes: false,
|
|
653
|
+
attributes: [
|
|
654
|
+
{
|
|
655
|
+
name: 'id',
|
|
656
|
+
isPrimaryKey: true,
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
name: 'metric',
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: 'path',
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: 'method',
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: 'type',
|
|
669
|
+
},
|
|
670
|
+
],
|
|
671
|
+
})));
|
|
672
|
+
}
|
|
673
|
+
(0, manageThreads_js_1.setChildListenerByType)(ANALYTICS_REPORT_TYPE, recordAnalytics);
|
|
674
|
+
let scheduledTasksRunning;
|
|
675
|
+
function startScheduledTasks() {
|
|
676
|
+
scheduledTasksRunning = true;
|
|
677
|
+
const AGGREGATE_PERIOD = (0, environmentManager_js_1.get)(hdbTerms_ts_1.CONFIG_PARAMS.ANALYTICS_AGGREGATEPERIOD) * 1000;
|
|
678
|
+
if (AGGREGATE_PERIOD) {
|
|
679
|
+
setInterval(async () => {
|
|
680
|
+
await aggregation(exports.analyticsDelay, AGGREGATE_PERIOD);
|
|
681
|
+
await cleanup(getRawAnalyticsTable(), RAW_EXPIRATION);
|
|
682
|
+
await cleanup(getAnalyticsTable(), AGGREGATE_EXPIRATION);
|
|
683
|
+
}, Math.min(AGGREGATE_PERIOD / 2, 0x7fffffff)).unref();
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
let totalBytesProcessed = 0;
|
|
687
|
+
const lastUtilizations = new Map();
|
|
688
|
+
const LOG_ANALYTICS = false; // TODO: Make this a config option if we really want this
|
|
689
|
+
function recordAnalytics(message, worker) {
|
|
690
|
+
const report = message.report;
|
|
691
|
+
report.threadId = worker?.threadId || worker_threads_1.threadId;
|
|
692
|
+
// Add system information stats as well
|
|
693
|
+
for (const metric of report.metrics) {
|
|
694
|
+
if (metric.metric === 'bytes-sent') {
|
|
695
|
+
totalBytesProcessed += metric.mean * metric.count;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
report.totalBytesProcessed = totalBytesProcessed;
|
|
699
|
+
if (worker) {
|
|
700
|
+
report.metrics.push({
|
|
701
|
+
metric: metadata_ts_1.METRIC.UTILIZATION,
|
|
702
|
+
...worker.performance.eventLoopUtilization(lastUtilizations.get(worker)),
|
|
703
|
+
});
|
|
704
|
+
lastUtilizations.set(worker, worker.performance.eventLoopUtilization());
|
|
705
|
+
}
|
|
706
|
+
report.id = (0, commonUtility_js_1.getNextMonotonicTime)();
|
|
707
|
+
getRawAnalyticsTable().primaryStore.put(report.id, report);
|
|
708
|
+
if (!scheduledTasksRunning)
|
|
709
|
+
startScheduledTasks();
|
|
710
|
+
if (LOG_ANALYTICS)
|
|
711
|
+
lastAppend = logAnalytics(report);
|
|
712
|
+
}
|
|
713
|
+
let lastAppend;
|
|
714
|
+
let analyticsLog;
|
|
715
|
+
const MAX_ANALYTICS_SIZE = 1000000;
|
|
716
|
+
async function logAnalytics(report) {
|
|
717
|
+
await lastAppend;
|
|
718
|
+
if (!analyticsLog) {
|
|
719
|
+
const logDir = (0, path_1.dirname)(getLogFilePath());
|
|
720
|
+
try {
|
|
721
|
+
analyticsLog = await (0, promises_2.open)((0, path_1.join)(logDir, 'analytics.log'), 'r+');
|
|
722
|
+
}
|
|
723
|
+
catch {
|
|
724
|
+
analyticsLog = await (0, promises_2.open)((0, path_1.join)(logDir, 'analytics.log'), 'w+');
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
let position = (await analyticsLog.stat()).size;
|
|
728
|
+
if (position > MAX_ANALYTICS_SIZE) {
|
|
729
|
+
let contents = Buffer.alloc(position);
|
|
730
|
+
await analyticsLog.read(contents, { position: 0 });
|
|
731
|
+
contents = contents.subarray(contents.indexOf(10, contents.length / 2) + 1); // find a carriage return to break on after the halfway point
|
|
732
|
+
await analyticsLog.write(contents, { position: 0 });
|
|
733
|
+
await analyticsLog.truncate(contents.length);
|
|
734
|
+
position = contents.length;
|
|
735
|
+
}
|
|
736
|
+
await analyticsLog.write(JSON.stringify(report) + '\n', position);
|
|
737
|
+
}
|
|
738
|
+
function onAnalyticsAggregate(callback) {
|
|
739
|
+
if (callback) {
|
|
740
|
+
analyticsAggregateListeners.push(callback);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* This section contains a possible/experimental approach to bucketing values as they come instead of pushing all into an array and sorting.
|
|
745
|
+
*
|
|
746
|
+
const BUCKET_COUNT = 100;
|
|
747
|
+
function addToBucket(action, value) {
|
|
748
|
+
if (!action.buckets) {
|
|
749
|
+
action.buckets = newBuckets();
|
|
750
|
+
}
|
|
751
|
+
const { counts, values, totalCount } = action.buckets;
|
|
752
|
+
let jump = BUCKET_COUNT >> 1; // amount to jump with each iteration
|
|
753
|
+
let position = jump; // start at halfway point
|
|
754
|
+
while ((jump = jump >> 1) > 0) {
|
|
755
|
+
const bucketValue = values[position];
|
|
756
|
+
if (bucketValue === 0) {
|
|
757
|
+
// unused slot, immediately put our value in
|
|
758
|
+
counts[position] = 1;
|
|
759
|
+
values[position] = value;
|
|
760
|
+
}
|
|
761
|
+
if (value > bucketValue) {
|
|
762
|
+
position += jump;
|
|
763
|
+
} else {
|
|
764
|
+
position -= jump;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
const count = counts[position] + 1;
|
|
768
|
+
if (position === BUCKET_COUNT) {
|
|
769
|
+
// if we go beyond the last item, increase the bucket (max) value
|
|
770
|
+
position--;
|
|
771
|
+
values[position] = value;
|
|
772
|
+
}
|
|
773
|
+
if (count > threshold) {
|
|
774
|
+
rebalance(action.buckets, false);
|
|
775
|
+
} else {
|
|
776
|
+
counts[position] = count;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
function newBuckets() {
|
|
781
|
+
const ab = new ArrayBuffer(8 * BUCKET_COUNT);
|
|
782
|
+
return {
|
|
783
|
+
values: new Float32Array(ab, 0, BUCKET_COUNT),
|
|
784
|
+
counts: new Uint32Array(ab, BUCKET_COUNT * 4, BUCKET_COUNT),
|
|
785
|
+
totalCount: 0,
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
let balancingBuckets;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Rebalance the buckets, we can reset the counts at the same time, if this occurred after a delivery
|
|
793
|
+
* @param param
|
|
794
|
+
* @param resetCounts
|
|
795
|
+
*
|
|
796
|
+
function rebalance({ counts, values, totalCount }, resetCounts: boolean) {
|
|
797
|
+
const countPerBucket = totalCount / BUCKET_COUNT;
|
|
798
|
+
let targetPosition = 0;
|
|
799
|
+
let targetCount = 0;
|
|
800
|
+
let lastTargetValue = 0;
|
|
801
|
+
const { values: targetValues, counts: targetCounts } = balancingBuckets || (balancingBuckets = newBuckets());
|
|
802
|
+
for (let i = 0; i < BUCKET_COUNT; i++) {
|
|
803
|
+
// iterate through the existing buckets, filling up the target buckets in a balanced way
|
|
804
|
+
let count = counts[i];
|
|
805
|
+
while ((countPerBucket - targetCount) < count) {
|
|
806
|
+
const value = values[i];
|
|
807
|
+
lastTargetValue = ((countPerBucket - targetCount) / count) * (value - lastTargetValue) + lastTargetValue;
|
|
808
|
+
targetValues[targetPosition] = lastTargetValue;
|
|
809
|
+
targetCounts[targetPosition] = countPerBucket;
|
|
810
|
+
count -= countPerBucket;
|
|
811
|
+
targetPosition++;
|
|
812
|
+
targetCount = 0;
|
|
813
|
+
}
|
|
814
|
+
targetCount += count;
|
|
815
|
+
}
|
|
816
|
+
// now copy the balanced buckets back into the original buckets
|
|
817
|
+
values.set(targetValues);
|
|
818
|
+
if (resetCounts) counts.fill(0);
|
|
819
|
+
else counts.set(targetCounts);
|
|
820
|
+
}
|
|
821
|
+
*/
|
|
822
|
+
//# sourceMappingURL=write.js.map
|