mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 14:04:49 -05:00
perf - add more platform details
This commit is contained in:
@@ -340,8 +340,9 @@ export class ShowStartupPerformance extends Action {
|
||||
setTimeout(() => {
|
||||
(<any>console).group('Startup Performance Measurement');
|
||||
const fingerprint: IStartupFingerprint = timers.fingerprint;
|
||||
console.log(`OS: ${fingerprint.platform} (${fingerprint.release})`);
|
||||
console.log(`CPUs: ${fingerprint.cpus.model} (${fingerprint.cpus.count} x ${fingerprint.cpus.speed})`);
|
||||
console.log(`Total Memory: ${(fingerprint.totalmem / (1024 * 1024 * 1024)).toFixed(2)}GB`);
|
||||
console.log(`Memory: ${(fingerprint.totalmem / (1024 * 1024 * 1024)).toFixed(2)}GB (${(fingerprint.freemem / (1024 * 1024 * 1024)).toFixed(2)}GB free)`);
|
||||
console.log(`Initial Startup: ${fingerprint.initialStartup}`);
|
||||
console.log(`Screen Reader Active: ${fingerprint.hasAccessibilitySupport}`);
|
||||
console.log(`Empty Workspace: ${fingerprint.emptyWorkbench}`);
|
||||
|
||||
@@ -34,7 +34,10 @@ export interface IStartupFingerprint {
|
||||
ellapsedEditorRestore: number;
|
||||
ellapsedWorkbench: number;
|
||||
};
|
||||
platform: string;
|
||||
release: string;
|
||||
totalmem: number;
|
||||
freemem: number;
|
||||
cpus: { count: number; speed: number; model: string; };
|
||||
initialStartup: boolean;
|
||||
hasAccessibilitySupport: boolean;
|
||||
|
||||
@@ -216,10 +216,16 @@ export class WorkbenchShell {
|
||||
const initialStartup = !!timers.isInitialStartup;
|
||||
const start = initialStartup ? timers.perfStartTime : timers.perfWindowLoadTime;
|
||||
let totalmem: number;
|
||||
let freemem: number;
|
||||
let cpus: { count: number; speed: number; model: string; };
|
||||
let platform: string;
|
||||
let release: string;
|
||||
|
||||
try {
|
||||
totalmem = os.totalmem();
|
||||
freemem = os.freemem();
|
||||
platform = os.platform();
|
||||
release = os.release();
|
||||
|
||||
const rawCpus = os.cpus();
|
||||
if (rawCpus && rawCpus.length > 0) {
|
||||
@@ -239,7 +245,10 @@ export class WorkbenchShell {
|
||||
ellapsedEditorRestore: Math.round(restoreEditorsDuration),
|
||||
ellapsedWorkbench: Math.round(workbenchStarted - timers.perfBeforeWorkbenchOpen)
|
||||
},
|
||||
platform,
|
||||
release,
|
||||
totalmem,
|
||||
freemem,
|
||||
cpus,
|
||||
initialStartup,
|
||||
hasAccessibilitySupport: !!timers.hasAccessibilitySupport,
|
||||
|
||||
Reference in New Issue
Block a user