remove args.timestamp

This commit is contained in:
Joao Moreno 2016-08-18 16:54:40 +02:00
parent ab09cff06d
commit e4b316978b
6 changed files with 2 additions and 27 deletions

View file

@ -143,13 +143,11 @@ export class EnvService implements IEnvService {
const argv = parseArgs(args); const argv = parseArgs(args);
const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto); const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto);
const timestamp = parseInt(argv.timestamp);
const debugBrkFileWatcherPort = getNumericValue(argv.debugBrkFileWatcherPort, void 0); const debugBrkFileWatcherPort = getNumericValue(argv.debugBrkFileWatcherPort, void 0);
this._cliArgs = Object.freeze({ this._cliArgs = Object.freeze({
_: [], _: [],
paths, paths,
timestamp: types.isNumber(timestamp) ? String(timestamp) : '0',
performance: argv.performance, performance: argv.performance,
verbose: argv.verbose, verbose: argv.verbose,
debugPluginHost: argv.debugPluginHost, debugPluginHost: argv.debugPluginHost,

View file

@ -134,9 +134,6 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: IProce
app.setAppUserModelId(envService.product.win32AppUserModelId); app.setAppUserModelId(envService.product.win32AppUserModelId);
} }
// Set programStart in the global scope
global.programStart = envService.cliArgs.timestamp;
function dispose() { function dispose() {
if (mainIpcServer) { if (mainIpcServer) {
mainIpcServer.dispose(); mainIpcServer.dispose();

View file

@ -25,7 +25,6 @@ export interface ParsedArgs extends minimist.ParsedArgs {
extensionHomePath?: string; extensionHomePath?: string;
extensionDevelopmentPath?: string; extensionDevelopmentPath?: string;
extensionTestsPath?: string; extensionTestsPath?: string;
timestamp?: string;
debugBrkPluginHost?: string; debugBrkPluginHost?: string;
debugPluginHost?: string; debugPluginHost?: string;
'list-extensions'?: boolean; 'list-extensions'?: boolean;
@ -40,7 +39,6 @@ const options: minimist.Opts = {
'extensionHomePath', 'extensionHomePath',
'extensionDevelopmentPath', 'extensionDevelopmentPath',
'extensionTestsPath', 'extensionTestsPath',
'timestamp',
'install-extension', 'install-extension',
'uninstall-extension', 'uninstall-extension',
'debugBrkPluginHost', 'debugBrkPluginHost',

View file

@ -302,7 +302,7 @@ export class ShowStartupPerformance extends Action {
const table: any[] = []; const table: any[] = [];
table.push(...this._analyzeLoaderTimes()); table.push(...this._analyzeLoaderTimes());
const start = Math.round(remote.getGlobal('programStart') || remote.getGlobal('vscodeStart')); const start = Math.round(remote.getGlobal('vscodeStart'));
const windowShowTime = Math.round(remote.getGlobal('windowShow')); const windowShowTime = Math.round(remote.getGlobal('windowShow'));
let lastEvent: timer.ITimerEvent; let lastEvent: timer.ITimerEvent;

View file

@ -162,16 +162,9 @@ function main() {
}; };
if (configuration.performance) { if (configuration.performance) {
const programStart = remote.getGlobal('programStart');
const vscodeStart = remote.getGlobal('vscodeStart'); const vscodeStart = remote.getGlobal('vscodeStart');
if (programStart) {
timers.beforeProgram = new Date(programStart);
timers.afterProgram = new Date(vscodeStart);
}
timers.vscodeStart = new Date(vscodeStart); timers.vscodeStart = new Date(vscodeStart);
timers.start = new Date(programStart || vscodeStart); timers.start = new Date(vscodeStart);
} }
timers.beforeLoad = new Date(); timers.beforeLoad = new Date();

View file

@ -376,17 +376,6 @@ export class WorkbenchShell {
if (timers) { if (timers) {
const events: timer.IExistingTimerEvent[] = []; const events: timer.IExistingTimerEvent[] = [];
// Program
if (timers.beforeProgram) {
events.push({
startTime: timers.beforeProgram,
stopTime: timers.afterProgram,
topic: 'Startup',
name: 'Program Start',
description: 'Time it takes to pass control to VSCodes main method'
});
}
// Window // Window
if (timers.vscodeStart) { if (timers.vscodeStart) {
events.push({ events.push({