Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)

* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898

* Fixes and cleanup

* Distro

* Fix hygiene yarn

* delete no yarn lock changes file

* Fix hygiene

* Fix layer check

* Fix CI

* Skip lib checks

* Remove tests deleted in vs code

* Fix tests

* Distro

* Fix tests and add removed extension point

* Skip failing notebook tests for now

* Disable broken tests and cleanup build folder

* Update yarn.lock and fix smoke tests

* Bump sqlite

* fix contributed actions and file spacing

* Fix user data path

* Update yarn.locks

Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-06-17 08:17:11 -07:00
committed by GitHub
parent fdcb97c7f7
commit 3cb2f552a6
2582 changed files with 124827 additions and 87099 deletions

View File

@@ -15,6 +15,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { Barrier } from 'vs/base/common/async';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
/* __GDPR__FRAGMENT__
"IMemoryInfo" : {
@@ -41,21 +42,27 @@ export interface IMemoryInfo {
"panelId": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"editorIds": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"timers.ellapsedAppReady" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedNlsGeneration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedLoadMainBundle" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedCrashReporter" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedMainServer" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWindowCreate" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWindowLoad" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWindowLoadToRequire" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedExtensions" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedExtensionsReady" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedRequire" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkspaceStorageInit" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWaitForWindowConfig" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWaitForShellEnv" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedStorageInit" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkspaceServiceInit" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedSharedProcesConnected" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedRequiredUserDataInit" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedOtherUserDataInit" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedRequire" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedExtensions" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedExtensionsReady" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedViewletRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedPanelRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedEditorRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedNlsGeneration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWaitForShellEnv" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"platform" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"release" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"arch" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
@@ -175,6 +182,54 @@ export interface IStartupMetrics {
*/
readonly ellapsedLoadMainBundle?: number;
/**
* The time it took to start the crash reporter.
*
* * Happens in the main-process
* * Measured with the `willStartCrashReporter` and `didStartCrashReporter` performance marks.
*/
readonly ellapsedCrashReporter?: number;
/**
* The time it took to create the main instance server.
*
* * Happens in the main-process
* * Measured with the `willStartMainServer` and `didStartMainServer` performance marks.
*/
readonly ellapsedMainServer?: number;
/**
* The time it took to create the window.
*
* * Happens in the main-process
* * Measured with the `willCreateCodeWindow` and `didCreateCodeWindow` performance marks.
*/
readonly ellapsedWindowCreate?: number;
/**
* The time it took to create the electron browser window.
*
* * Happens in the main-process
* * Measured with the `willCreateCodeBrowserWindow` and `didCreateCodeBrowserWindow` performance marks.
*/
readonly ellapsedBrowserWindowCreate?: number;
/**
* The time it took to restore and validate window state.
*
* * Happens in the main-process
* * Measured with the `willRestoreCodeWindowState` and `didRestoreCodeWindowState` performance marks.
*/
readonly ellapsedWindowRestoreState?: number;
/**
* The time it took to maximize/show the window.
*
* * Happens in the main-process
* * Measured with the `willMaximizeCodeWindow` and `didMaximizeCodeWindow` performance marks.
*/
readonly ellapsedWindowMaximize?: number;
/**
* The time it took to tell electron to open/restore a renderer (browser window).
*
@@ -197,6 +252,15 @@ export interface IStartupMetrics {
*/
readonly ellapsedWindowLoadToRequire: number;
/**
* The time it took to wait for resolving the window configuration. This time the workbench
* will not continue to load and be blocked entirely.
*
* * Happens in the renderer-process
* * Measured with the `willWaitForWindowConfig` and `didWaitForWindowConfig` performance marks.
*/
readonly ellapsedWaitForWindowConfig: number;
/**
* The time it took to wait for resolving the shell environment. This time the workbench
* will not continue to load and be blocked entirely.
@@ -207,13 +271,12 @@ export interface IStartupMetrics {
readonly ellapsedWaitForShellEnv: number;
/**
* The time it took to require the workspace storage DB, connect to it
* and load the initial set of values.
* The time it took to init the storage database connection from the workbench.
*
* * Happens in the renderer-process
* * Measured with the `code/willInitWorkspaceStorage` and `code/didInitWorkspaceStorage` performance marks.
* * Measured with the `code/willInitStorage` and `code/didInitStorage` performance marks.
*/
readonly ellapsedWorkspaceStorageInit: number;
readonly ellapsedStorageInit: number;
/**
* The time it took to initialize the workspace and configuration service.
@@ -223,6 +286,14 @@ export interface IStartupMetrics {
*/
readonly ellapsedWorkspaceServiceInit: number;
/**
* The time it took to connect to the shared process.
*
* * Happens in the renderer-process
* * Measured with the `willConnectSharedProcess` and `didConnectSharedProcess` performance marks.
*/
readonly ellapsedSharedProcesConnected: number;
/**
* The time it took to initialize required user data (settings & global state) using settings sync service.
*
@@ -287,8 +358,8 @@ export interface IStartupMetrics {
readonly ellapsedPanelRestore: number;
/**
* The time it took to restore editors - that is text editor and complex editor likes the settings UI
* or webviews (markdown preview).
* The time it took to restore and fully resolve visible editors - that is text editor
* and complex editor likes the settings UI or webviews (markdown preview).
*
* * Happens in the renderer-process
* * Measured with the `willRestoreEditors` and `didRestoreEditors` performance marks.
@@ -412,10 +483,12 @@ export abstract class AbstractTimerService implements ITimerService {
@IEditorService private readonly _editorService: IEditorService,
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
Promise.all([
this._extensionService.whenInstalledExtensionsRegistered(),
_lifecycleService.when(LifecyclePhase.Restored)
this._extensionService.whenInstalledExtensionsRegistered(), // extensions registered
_lifecycleService.when(LifecyclePhase.Restored), // workbench created and parts restored
layoutService.whenRestored // layout restored (including visible editors resolved)
]).then(() => {
// set perf mark from renderer
this.setPerformanceMarks('renderer', perf.getMarks());
@@ -502,7 +575,7 @@ export abstract class AbstractTimerService implements ITimerService {
windowKind: this._lifecycleService.startupKind,
windowCount: await this._getWindowCount(),
viewletId: activeViewlet?.getId(),
editorIds: this._editorService.visibleEditors.map(input => input.getTypeId()),
editorIds: this._editorService.visibleEditors.map(input => input.typeId),
panelId: activePanel ? activePanel.getId() : undefined,
// timers
@@ -510,11 +583,19 @@ export abstract class AbstractTimerService implements ITimerService {
ellapsedAppReady: initialStartup ? this._marks.getDuration('code/didStartMain', 'code/mainAppReady') : undefined,
ellapsedNlsGeneration: initialStartup ? this._marks.getDuration('code/willGenerateNls', 'code/didGenerateNls') : undefined,
ellapsedLoadMainBundle: initialStartup ? this._marks.getDuration('code/willLoadMainBundle', 'code/didLoadMainBundle') : undefined,
ellapsedCrashReporter: initialStartup ? this._marks.getDuration('code/willStartCrashReporter', 'code/didStartCrashReporter') : undefined,
ellapsedMainServer: initialStartup ? this._marks.getDuration('code/willStartMainServer', 'code/didStartMainServer') : undefined,
ellapsedWindowCreate: initialStartup ? this._marks.getDuration('code/willCreateCodeWindow', 'code/didCreateCodeWindow') : undefined,
ellapsedWindowRestoreState: initialStartup ? this._marks.getDuration('code/willRestoreCodeWindowState', 'code/didRestoreCodeWindowState') : undefined,
ellapsedBrowserWindowCreate: initialStartup ? this._marks.getDuration('code/willCreateCodeBrowserWindow', 'code/didCreateCodeBrowserWindow') : undefined,
ellapsedWindowMaximize: initialStartup ? this._marks.getDuration('code/willMaximizeCodeWindow', 'code/didMaximizeCodeWindow') : undefined,
ellapsedWindowLoad: initialStartup ? this._marks.getDuration('code/mainAppReady', 'code/willOpenNewWindow') : undefined,
ellapsedWindowLoadToRequire: this._marks.getDuration('code/willOpenNewWindow', 'code/willLoadWorkbenchMain'),
ellapsedRequire: this._marks.getDuration('code/willLoadWorkbenchMain', 'code/didLoadWorkbenchMain'),
ellapsedWaitForWindowConfig: this._marks.getDuration('code/willWaitForWindowConfig', 'code/didWaitForWindowConfig'),
ellapsedWaitForShellEnv: this._marks.getDuration('code/willWaitForShellEnv', 'code/didWaitForShellEnv'),
ellapsedWorkspaceStorageInit: this._marks.getDuration('code/willInitWorkspaceStorage', 'code/didInitWorkspaceStorage'),
ellapsedStorageInit: this._marks.getDuration('code/willInitStorage', 'code/didInitStorage'),
ellapsedSharedProcesConnected: this._marks.getDuration('code/willConnectSharedProcess', 'code/didConnectSharedProcess'),
ellapsedWorkspaceServiceInit: this._marks.getDuration('code/willInitWorkspaceService', 'code/didInitWorkspaceService'),
ellapsedRequiredUserDataInit: this._marks.getDuration('code/willInitRequiredUserData', 'code/didInitRequiredUserData'),
ellapsedOtherUserDataInit: this._marks.getDuration('code/willInitOtherUserData', 'code/didInitOtherUserData'),

View File

@@ -13,9 +13,11 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
import { IStartupMetrics, AbstractTimerService, Writeable } from 'vs/workbench/services/timer/browser/timerService';
import { IStartupMetrics, AbstractTimerService, Writeable, ITimerService } from 'vs/workbench/services/timer/browser/timerService';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { context, process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class TimerService extends AbstractTimerService {
@@ -31,8 +33,9 @@ export class TimerService extends AbstractTimerService {
@IEditorService editorService: IEditorService,
@IAccessibilityService accessibilityService: IAccessibilityService,
@ITelemetryService telemetryService: ITelemetryService,
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService
) {
super(lifecycleService, contextService, extensionService, updateService, viewletService, panelService, editorService, accessibilityService, telemetryService);
super(lifecycleService, contextService, extensionService, updateService, viewletService, panelService, editorService, accessibilityService, telemetryService, layoutService);
this.setPerformanceMarks('main', _environmentService.configuration.perfMarks);
}
@@ -80,11 +83,13 @@ export class TimerService extends AbstractTimerService {
}
}
registerSingleton(ITimerService, TimerService);
//#region cached data logic
export function didUseCachedData(): boolean {
// TODO@bpasero TODO@jrieken need a different way to figure out if cached data was used
if (context.sandbox) {
// TODO@sandbox need a different way to figure out if cached data was used
if (process.sandboxed) {
return true;
}
// We surely don't use cached data when we don't tell the loader to do so