提交 e71ba77e 编写于 作者: B Benjamin Pasero

storage - disable automated integrity check for now

上级 5f973bc6
...@@ -198,7 +198,7 @@ export class StorageService extends Disposable implements IStorageService { ...@@ -198,7 +198,7 @@ export class StorageService extends Disposable implements IStorageService {
workspaceItemsParsed.set(key, safeParse(value)); 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 = []; let globalValues = [];
globalItems.forEach((value, key) => { globalItems.forEach((value, key) => {
globalValues.push({ key, value }); globalValues.push({ key, value });
...@@ -208,7 +208,7 @@ export class StorageService extends Disposable implements IStorageService { ...@@ -208,7 +208,7 @@ export class StorageService extends Disposable implements IStorageService {
console.log(globalItemsParsed); 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 = []; let workspaceValues = [];
workspaceItems.forEach((value, key) => { workspaceItems.forEach((value, key) => {
workspaceValues.push({ key, value }); workspaceValues.push({ key, value });
......
...@@ -297,8 +297,6 @@ export class WorkbenchShell extends Disposable { ...@@ -297,8 +297,6 @@ export class WorkbenchShell extends Disposable {
const workbenchLoadDuration = perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'); const workbenchLoadDuration = perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain');
const localStorageDuration = perf.getDuration('willReadLocalStorage', 'didReadLocalStorage'); const localStorageDuration = perf.getDuration('willReadLocalStorage', 'didReadLocalStorage');
let workspaceIntegrity = 'unresolved';
// Handle errors (avoid duplicates to reduce spam) // Handle errors (avoid duplicates to reduce spam)
const loggedStorageErrors = new Set<string>(); const loggedStorageErrors = new Set<string>();
this._register(this.storageService.storage.onStorageError(error => { this._register(this.storageService.storage.onStorageError(error => {
...@@ -320,7 +318,6 @@ export class WorkbenchShell extends Disposable { ...@@ -320,7 +318,6 @@ export class WorkbenchShell extends Disposable {
"workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"integrityWorkspace" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"storageError": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } "storageError": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
} }
*/ */
...@@ -336,19 +333,11 @@ export class WorkbenchShell extends Disposable { ...@@ -336,19 +333,11 @@ export class WorkbenchShell extends Disposable {
'workbenchRequireTime': workbenchLoadDuration, 'workbenchRequireTime': workbenchLoadDuration,
'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE), 'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE),
'startupKind': this.lifecycleService.startupKind, 'startupKind': this.lifecycleService.startupKind,
'integrityWorkspace': workspaceIntegrity,
'storageError': errorStr '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) { if (this.storageService.storage.hasErrors) {
return; // do not log performance numbers when errors occured return; // do not log performance numbers when errors occured
...@@ -368,8 +357,6 @@ export class WorkbenchShell extends Disposable { ...@@ -368,8 +357,6 @@ export class WorkbenchShell extends Disposable {
"workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspaceSchemaTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspaceReadTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"localStorageTime" : { "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 }, "workbenchRequireTime" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, "workspaceKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true } "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
...@@ -384,13 +371,10 @@ export class WorkbenchShell extends Disposable { ...@@ -384,13 +371,10 @@ export class WorkbenchShell extends Disposable {
'workspaceSchemaTime': workspaceStorageSchemaDuration, 'workspaceSchemaTime': workspaceStorageSchemaDuration,
'workspaceReadTime': workspaceStorageInitDuration, 'workspaceReadTime': workspaceStorageInitDuration,
'localStorageTime': localStorageDuration, 'localStorageTime': localStorageDuration,
'integrityWorkspace': workspaceIntegrity,
'workspaceIntegrityCheckTime': perf.getDuration('willCheckWorkspaceStorageIntegrity', 'didCheckWorkspaceStorageIntegrity'),
'workbenchRequireTime': workbenchLoadDuration, 'workbenchRequireTime': workbenchLoadDuration,
'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE), 'workspaceKeys': this.storageService.storage.getSize(StorageScope.WORKSPACE),
'startupKind': this.lifecycleService.startupKind 'startupKind': this.lifecycleService.startupKind
}); });
}, error => errors.onUnexpectedError(error));
} }
private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册