remove prof-startup-timers
option
This commit is contained in:
parent
147fee87b8
commit
c6ad876e11
3 changed files with 1 additions and 24 deletions
|
@ -37,7 +37,6 @@ export interface ParsedArgs {
|
|||
'uninstall-extension'?: string | string[];
|
||||
'enable-proposed-api'?: string | string[];
|
||||
'open-url'?: string | string[];
|
||||
'prof-startup-timers': string;
|
||||
'skip-getting-started'?: boolean;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ const options: minimist.Opts = {
|
|||
'debugBrkPluginHost',
|
||||
'debugPluginHost',
|
||||
'open-url',
|
||||
'prof-startup-timers',
|
||||
'enable-proposed-api'
|
||||
],
|
||||
boolean: [
|
||||
|
|
|
@ -6,13 +6,8 @@
|
|||
'use strict';
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { join } from 'path';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { virtualMachineHint } from 'vs/base/node/id';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Registry } from 'vs/platform/platform';
|
||||
import { writeFile } from 'vs/base/node/pfs';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
|
@ -74,15 +69,8 @@ class PerformanceContribution implements IWorkbenchContribution {
|
|||
@IStorageService private _storageService: IStorageService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
) {
|
||||
const dumpFile = _envService.args['prof-startup-timers'];
|
||||
if (dumpFile) {
|
||||
// wait for extensions being loaded
|
||||
extensionService.onReady()
|
||||
.then(() => TPromise.timeout(15000)) // time service isn't ready yet because it listens on the same event...
|
||||
.then(() => this._dumpTimersAndQuit(dumpFile))
|
||||
.done(undefined, err => console.error(err));
|
||||
|
||||
} else if (!_envService.args['prof-startup']) {
|
||||
if (!_envService.args['prof-startup']) {
|
||||
// notify user of slow start
|
||||
setTimeout(() => {
|
||||
this._checkTimersAndSuggestToProfile();
|
||||
|
@ -94,14 +82,6 @@ class PerformanceContribution implements IWorkbenchContribution {
|
|||
return 'performance';
|
||||
}
|
||||
|
||||
private _dumpTimersAndQuit(folder: string) {
|
||||
const metrics = this._timerService.startupMetrics;
|
||||
const id = generateUuid();
|
||||
const all = assign({ id, commit: product.commit }, metrics);
|
||||
const raw = JSON.stringify(all);
|
||||
return writeFile(join(folder, `timers-${id}.json`), raw).then(() => this._windowsService.quit());
|
||||
}
|
||||
|
||||
private _checkTimersAndSuggestToProfile() {
|
||||
|
||||
if (!this._timerService.isInitialStartup) {
|
||||
|
@ -143,7 +123,6 @@ class PerformanceContribution implements IWorkbenchContribution {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
const profile = this._messageService.confirm({
|
||||
type: 'info',
|
||||
message: localize('slow', "Slow startup detected"),
|
||||
|
|
Loading…
Reference in a new issue