From e71ba77ec881fa25380673afeb0a7ce3bd2e027c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 Oct 2018 07:38:03 +0100 Subject: [PATCH] storage - disable automated integrity check for now --- .../platform/storage/node/storageService.ts | 4 +- src/vs/workbench/electron-browser/shell.ts | 82 ++++++++----------- 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/src/vs/platform/storage/node/storageService.ts b/src/vs/platform/storage/node/storageService.ts index c0a513fce58..c9f5966a917 100644 --- a/src/vs/platform/storage/node/storageService.ts +++ b/src/vs/platform/storage/node/storageService.ts @@ -198,7 +198,7 @@ export class StorageService extends Disposable implements IStorageService { workspaceItemsParsed.set(key, safeParse(value)); }); - console.group(`Storage: Global (check: ${result[2]}, load: ${getDuration('willInitGlobalStorage', 'didInitGlobalStorage')}, path: ${this.globalStorageWorkspacePath})`); + console.group(`Storage: Global (integrity: ${result[2]}, load: ${getDuration('willInitGlobalStorage', 'didInitGlobalStorage')}, path: ${this.globalStorageWorkspacePath})`); let globalValues = []; globalItems.forEach((value, key) => { globalValues.push({ key, value }); @@ -208,7 +208,7 @@ export class StorageService extends Disposable implements IStorageService { console.log(globalItemsParsed); - console.group(`Storage: Workspace (check: ${result[3]}, load: ${getDuration('willInitWorkspaceStorage', 'didInitWorkspaceStorage')}, path: ${this.workspaceStoragePath})`); + console.group(`Storage: Workspace (integrity: ${result[3]}, load: ${getDuration('willInitWorkspaceStorage', 'didInitWorkspaceStorage')}, path: ${this.workspaceStoragePath})`); let workspaceValues = []; workspaceItems.forEach((value, key) => { workspaceValues.push({ key, value }); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 988fd9dd4ae..d615bf8a01a 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -297,8 +297,6 @@ export class WorkbenchShell extends Disposable { const workbenchLoadDuration = perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'); const localStorageDuration = perf.getDuration('willReadLocalStorage', 'didReadLocalStorage'); - let workspaceIntegrity = 'unresolved'; - // Handle errors (avoid duplicates to reduce spam) const loggedStorageErrors = new Set(); this._register(this.storageService.storage.onStorageError(error => { @@ -320,7 +318,6 @@ export class WorkbenchShell extends Disposable { "workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "integrityWorkspace" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, "storageError": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } } */ @@ -336,61 +333,48 @@ export class WorkbenchShell extends Disposable { 'workbenchRequireTime': workbenchLoadDuration, 'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE), 'startupKind': this.lifecycleService.startupKind, - 'integrityWorkspace': workspaceIntegrity, 'storageError': errorStr }); } })); - perf.mark('willCheckWorkspaceStorageIntegrity'); - this.storageService.storage.checkIntegrity(StorageScope.WORKSPACE, false).then(integrity => { - perf.mark('didCheckWorkspaceStorageIntegrity'); - if (integrity) { - workspaceIntegrity = integrity; - } + if (this.storageService.storage.hasErrors) { + return; // do not log performance numbers when errors occured + } - if (this.storageService.storage.hasErrors) { - return; // do not log performance numbers when errors occured - } + if (this.environmentService.verbose) { + return; // do not log when running in verbose mode + } - if (this.environmentService.verbose) { - return; // do not log when running in verbose mode + /* __GDPR__ + "sqliteStorageTimers3" : { + "appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceExistsTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceMigrationTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "localStorageTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, + "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } } - - /* __GDPR__ - "sqliteStorageTimers3" : { - "appReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workbenchReadyTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceExistsTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceMigrationTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "localStorageTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "integrityWorkspace" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, - "workspaceIntegrityCheckTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } - } - */ - this.telemetryService.publicLog('sqliteStorageTimers3', { - 'appReadyTime': appReadyDuration, - 'workbenchReadyTime': workbenchReadyDuration, - 'workspaceExistsTime': workspaceStorageFileExistsDuration, - 'workspaceMigrationTime': workspaceStorageMigrationDuration, - 'workspaceRequireTime': workspaceStorageRequireDuration, - 'workspaceSchemaTime': workspaceStorageSchemaDuration, - 'workspaceReadTime': workspaceStorageInitDuration, - 'localStorageTime': localStorageDuration, - 'integrityWorkspace': workspaceIntegrity, - 'workspaceIntegrityCheckTime': perf.getDuration('willCheckWorkspaceStorageIntegrity', 'didCheckWorkspaceStorageIntegrity'), - 'workbenchRequireTime': workbenchLoadDuration, - 'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE), - 'startupKind': this.lifecycleService.startupKind - }); - }, error => errors.onUnexpectedError(error)); + */ + this.telemetryService.publicLog('sqliteStorageTimers3', { + 'appReadyTime': appReadyDuration, + 'workbenchReadyTime': workbenchReadyDuration, + 'workspaceExistsTime': workspaceStorageFileExistsDuration, + 'workspaceMigrationTime': workspaceStorageMigrationDuration, + 'workspaceRequireTime': workspaceStorageRequireDuration, + 'workspaceSchemaTime': workspaceStorageSchemaDuration, + 'workspaceReadTime': workspaceStorageInitDuration, + 'localStorageTime': localStorageDuration, + 'workbenchRequireTime': workbenchLoadDuration, + 'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE), + 'startupKind': this.lifecycleService.startupKind + }); } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { -- GitLab