Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -66,6 +66,7 @@ export interface IStartupMetrics {
ellapsedEditorRestore: number;
ellapsedWorkbench: number;
ellapsedTimersToTimersComputed: number;
ellapsedNlsGeneration: number;
};
platform: string;
release: string;
@@ -83,14 +84,7 @@ export interface IStartupMetrics {
export interface IInitData {
start: number;
appReady: number;
windowLoad: number;
beforeLoadWorkbenchMain: number;
afterLoadWorkbenchMain: number;
isInitialStartup: boolean;
hasAccessibilitySupport: boolean;
}
@@ -98,17 +92,5 @@ export interface IInitData {
export interface ITimerService extends IInitData {
_serviceBrand: any;
beforeDOMContentLoaded: number;
afterDOMContentLoaded: number;
beforeWorkbenchOpen: number;
workbenchStarted: number;
beforeExtensionLoad: number;
afterExtensionLoad: number;
restoreViewletDuration: number;
restoreEditorsDuration: number;
readonly startupMetrics: IStartupMetrics;
}

View File

@@ -6,7 +6,7 @@
import { ITimerService, IStartupMetrics, IInitData, IMemoryInfo } from 'vs/workbench/services/timer/common/timerService';
import { virtualMachineHint } from 'vs/base/node/id';
import * as perf from 'vs/base/common/performance';
import * as os from 'os';
export class TimerService implements ITimerService {
@@ -14,38 +14,17 @@ export class TimerService implements ITimerService {
public _serviceBrand: any;
public readonly start: number;
public readonly appReady: number;
public readonly windowLoad: number;
public readonly beforeLoadWorkbenchMain: number;
public readonly afterLoadWorkbenchMain: number;
public readonly isInitialStartup: boolean;
public readonly hasAccessibilitySupport: boolean;
public beforeDOMContentLoaded: number;
public afterDOMContentLoaded: number;
public beforeWorkbenchOpen: number;
public workbenchStarted: number;
public beforeExtensionLoad: number;
public afterExtensionLoad: number;
public restoreViewletDuration: number;
public restoreEditorsDuration: number;
private _startupMetrics: IStartupMetrics;
constructor(initData: IInitData, private isEmptyWorkbench: boolean) {
this.start = initData.start;
this.appReady = initData.appReady;
this.windowLoad = initData.windowLoad;
this.beforeLoadWorkbenchMain = initData.beforeLoadWorkbenchMain;
this.afterLoadWorkbenchMain = initData.afterLoadWorkbenchMain;
this.isInitialStartup = initData.isInitialStartup;
this.hasAccessibilitySupport = initData.hasAccessibilitySupport;
}
@@ -91,18 +70,22 @@ export class TimerService implements ITimerService {
// ignore, be on the safe side with these hardware method calls
}
let nlsStart = perf.getEntry('mark', 'nlsGeneration:start');
let nlsEnd = perf.getEntry('mark', 'nlsGeneration:end');
let nlsTime = nlsStart && nlsEnd ? nlsEnd.startTime - nlsStart.startTime : 0;
this._startupMetrics = {
version: 1,
ellapsed: this.workbenchStarted - start,
ellapsed: perf.getEntry('mark', 'didStartWorkbench').startTime - start,
timers: {
ellapsedExtensions: this.afterExtensionLoad - this.beforeExtensionLoad,
ellapsedExtensionsReady: this.afterExtensionLoad - start,
ellapsedRequire: this.afterLoadWorkbenchMain - this.beforeLoadWorkbenchMain,
ellapsedViewletRestore: this.restoreViewletDuration,
ellapsedEditorRestore: this.restoreEditorsDuration,
ellapsedWorkbench: this.workbenchStarted - this.beforeWorkbenchOpen,
ellapsedWindowLoadToRequire: this.beforeLoadWorkbenchMain - this.windowLoad,
ellapsedTimersToTimersComputed: Date.now() - now
ellapsedExtensions: perf.getDuration('willLoadExtensions', 'didLoadExtensions'),
ellapsedExtensionsReady: perf.getEntry('mark', 'didLoadExtensions').startTime - start,
ellapsedRequire: perf.getDuration('willLoadWorkbenchMain', 'didLoadWorkbenchMain'),
ellapsedEditorRestore: perf.getDuration('willRestoreEditors', 'didRestoreEditors'),
ellapsedViewletRestore: perf.getDuration('willRestoreViewlet', 'didRestoreViewlet'),
ellapsedWorkbench: perf.getDuration('willStartWorkbench', 'didStartWorkbench'),
ellapsedWindowLoadToRequire: perf.getEntry('mark', 'willLoadWorkbenchMain').startTime - this.windowLoad,
ellapsedTimersToTimersComputed: Date.now() - now,
ellapsedNlsGeneration: nlsTime
},
platform,
release,
@@ -119,8 +102,8 @@ export class TimerService implements ITimerService {
};
if (initialStartup) {
this._startupMetrics.timers.ellapsedAppReady = this.appReady - this.start;
this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - this.appReady;
this._startupMetrics.timers.ellapsedAppReady = perf.getDuration('main:started', 'main:appReady');
this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - perf.getEntry('mark', 'main:appReady').startTime;
}
}
}