@@ -10,7 +10,6 @@ import { join, basename } from 'vs/base/common/path';
1010import { parse , ParseError , getNodeType } from 'vs/base/common/json' ;
1111import { listProcesses } from 'vs/base/node/ps' ;
1212import product from 'vs/platform/product/common/product' ;
13- import { repeat , pad } from 'vs/base/common/strings' ;
1413import { isWindows , isLinux } from 'vs/base/common/platform' ;
1514import { URI } from 'vs/base/common/uri' ;
1615import { ProcessItem } from 'vs/base/common/processes' ;
@@ -435,7 +434,7 @@ export class DiagnosticsService implements IDiagnosticsService {
435434 private expandGPUFeatures ( gpuFeatures : any ) : string {
436435 const longestFeatureName = Math . max ( ...Object . keys ( gpuFeatures ) . map ( feature => feature . length ) ) ;
437436 // Make columns aligned by adding spaces after feature name
438- return Object . keys ( gpuFeatures ) . map ( feature => `${ feature } : ${ repeat ( ' ' , longestFeatureName - feature . length ) } ${ gpuFeatures [ feature ] } ` ) . join ( '\n ' ) ;
437+ return Object . keys ( gpuFeatures ) . map ( feature => `${ feature } : ${ ' ' . repeat ( longestFeatureName - feature . length ) } ${ gpuFeatures [ feature ] } ` ) . join ( '\n ' ) ;
439438 }
440439
441440 private formatWorkspaceMetadata ( info : IMainProcessInfo ) : Promise < string > {
@@ -500,14 +499,15 @@ export class DiagnosticsService implements IDiagnosticsService {
500499 if ( isRoot ) {
501500 name = item . pid === mainPid ? `${ product . applicationName } main` : 'remote agent' ;
502501 } else {
503- name = `${ repeat ( ' ' , indent ) } ${ item . name } ` ;
502+ name = `${ ' ' . repeat ( indent ) } ${ item . name } ` ;
504503
505504 if ( item . name === 'window' ) {
506505 name = `${ name } (${ mapPidToWindowTitle . get ( item . pid ) } )` ;
507506 }
508507 }
508+
509509 const memory = process . platform === 'win32' ? item . mem : ( osLib . totalmem ( ) * ( item . mem / 100 ) ) ;
510- output . push ( `${ pad ( Number ( item . load . toFixed ( 0 ) ) , 5 , ' ' ) } \t${ pad ( Number ( ( memory / MB ) . toFixed ( 0 ) ) , 6 , ' ' ) } \t${ pad ( Number ( ( item . pid ) . toFixed ( 0 ) ) , 6 , ' ' ) } \t${ name } ` ) ;
510+ output . push ( `${ item . load . toFixed ( 0 ) . padStart ( 5 , ' ' ) } \t${ ( memory / MB ) . toFixed ( 0 ) . padStart ( 6 , ' ' ) } \t${ item . pid . toFixed ( 0 ) . padStart ( 6 , ' ' ) } \t${ name } ` ) ;
511511
512512 // Recurse into children if any
513513 if ( Array . isArray ( item . children ) ) {
0 commit comments