@@ -810,31 +810,7 @@ <h3>Heap/RSS Ratio Over Time</h3>
810810 } ) ;
811811 } ) ;
812812
813- const totalGc = timestamps . map ( timestamp => {
814- let total = 0 ;
815- let hasAny = false ;
816- processKeys . forEach ( processKey => {
817- const [ processName , pid ] = processKey . split ( '|' ) ;
818- const sample = samples
819- . filter ( s => s . Name === processName && s . PID === pid && s . Timestamp === timestamp )
820- [ 0 ] ;
821- if ( sample && sample . GCTime !== undefined && sample . GCTime !== null && sample . GCTime > 0 ) {
822- total += sample . GCTime / 1000 ;
823- hasAny = true ;
824- }
825- } ) ;
826- return hasAny ? total : null ;
827- } ) ;
828-
829- traces . push ( {
830- x : timestamps . map ( t => new Date ( t ) ) ,
831- y : totalGc ,
832- type : 'scatter' ,
833- mode : 'lines' ,
834- name : 'Total GC Time' ,
835- line : { color : '#2c3e50' , width : 4 } ,
836- connectgaps : false
837- } ) ;
813+ // Total GC line intentionally omitted.
838814
839815 // Detect if mobile
840816 const isMobile = window . innerWidth < 768 ;
@@ -924,49 +900,7 @@ <h3>Heap/RSS Ratio Over Time</h3>
924900 } ) ;
925901 } ) ;
926902
927- const lastKnownRss = { } ;
928- const lastKnownHeap = { } ;
929- processKeys . forEach ( processKey => {
930- lastKnownRss [ processKey ] = 0 ;
931- lastKnownHeap [ processKey ] = 0 ;
932- } ) ;
933-
934- const totalRatio = timestamps . map ( timestamp => {
935- let totalRss = 0 ;
936- let totalHeap = 0 ;
937- let hasAny = false ;
938- processKeys . forEach ( processKey => {
939- const [ processName , pid ] = processKey . split ( '|' ) ;
940- const sample = samples
941- . filter ( s => s . Name === processName && s . PID === pid && s . Timestamp === timestamp )
942- [ 0 ] ;
943- if ( sample ) {
944- if ( sample . RSS && sample . RSS > 0 ) {
945- lastKnownRss [ processKey ] = sample . RSS ;
946- }
947- if ( sample . HeapUsed && sample . HeapUsed > 0 ) {
948- lastKnownHeap [ processKey ] = sample . HeapUsed ;
949- }
950- }
951- if ( lastKnownRss [ processKey ] > 0 ) {
952- totalRss += lastKnownRss [ processKey ] ;
953- totalHeap += lastKnownHeap [ processKey ] ;
954- hasAny = true ;
955- }
956- } ) ;
957- if ( ! hasAny || totalRss === 0 ) return null ;
958- return totalHeap / totalRss ;
959- } ) ;
960-
961- traces . push ( {
962- x : timestamps . map ( t => new Date ( t ) ) ,
963- y : totalRatio ,
964- type : 'scatter' ,
965- mode : 'lines' ,
966- name : 'Total Heap/RSS Ratio' ,
967- line : { color : '#2c3e50' , width : 4 } ,
968- connectgaps : false
969- } ) ;
903+ // Total Heap/RSS ratio line intentionally omitted.
970904
971905 // Detect if mobile
972906 const isMobile = window . innerWidth < 768 ;
@@ -1093,29 +1027,7 @@ <h3>Heap/RSS Ratio Over Time</h3>
10931027 totalHeap . push ( hasAny ? totalHeapValue : null ) ;
10941028 } ) ;
10951029
1096- const totalRatio = totalRss . map ( ( rssValue , index ) => {
1097- const heapValue = totalHeap [ index ] ;
1098- if ( ! rssValue || rssValue === 0 || heapValue === null ) return null ;
1099- return heapValue / rssValue ;
1100- } ) ;
1101-
1102- const totalGc = timestamps . map ( timestamp => {
1103- let total = 0 ;
1104- let hasAny = false ;
1105- processKeys . forEach ( processKey => {
1106- const [ processName , pid ] = processKey . split ( '|' ) ;
1107- const sample = samples . find ( s => s . Name === processName && s . PID === pid && s . Timestamp === timestamp ) ;
1108- if ( sample && sample . GCTime !== undefined && sample . GCTime !== null && sample . GCTime > 0 ) {
1109- total += sample . GCTime / 1000 ;
1110- hasAny = true ;
1111- }
1112- } ) ;
1113- return hasAny ? total : null ;
1114- } ) ;
1115-
11161030 const firstTotalRssIndex = totalRss . findIndex ( value => value !== null ) ;
1117- const firstTotalRatioIndex = totalRatio . findIndex ( value => value !== null ) ;
1118- const firstTotalGcIndex = totalGc . findIndex ( value => value !== null ) ;
11191031
11201032 const compareSamplesRaw = Array . isArray ( window . compareSamples ) ? window . compareSamples : [ ] ;
11211033 const compareSamples = normalizeCompareSamples ( compareSamplesRaw , timestamps [ 0 ] ) ;
@@ -1212,17 +1124,6 @@ <h3>Heap/RSS Ratio Over Time</h3>
12121124 connectgaps : false
12131125 } ) ;
12141126 } ) ;
1215- if ( firstTotalGcIndex !== - 1 && frameIndex >= firstTotalGcIndex ) {
1216- traces . push ( {
1217- x : frameTimestamps ,
1218- y : totalGc . slice ( 0 , frameIndex + 1 ) ,
1219- type : 'scatter' ,
1220- mode : 'lines' ,
1221- name : 'Total GC Time' ,
1222- line : { color : '#2c3e50' , width : 4 } ,
1223- connectgaps : false
1224- } ) ;
1225- }
12261127 if ( compareData ) {
12271128 compareData . processKeys . forEach ( processKey => {
12281129 const def = compareData . series [ processKey ] ;
@@ -1238,17 +1139,6 @@ <h3>Heap/RSS Ratio Over Time</h3>
12381139 connectgaps : false
12391140 } ) ;
12401141 } ) ;
1241- if ( compareData . firstTotalGcIndex !== - 1 && frameIndex >= compareData . firstTotalGcIndex ) {
1242- traces . push ( {
1243- x : frameTimestamps ,
1244- y : compareData . totalGc . slice ( 0 , frameIndex + 1 ) ,
1245- type : 'scatter' ,
1246- mode : 'lines' ,
1247- name : 'Compare Total GC Time' ,
1248- line : { color : '#0f172a' , width : 3 , dash : 'dot' } ,
1249- connectgaps : false
1250- } ) ;
1251- }
12521142 }
12531143 return traces ;
12541144 }
@@ -1270,17 +1160,6 @@ <h3>Heap/RSS Ratio Over Time</h3>
12701160 connectgaps : false
12711161 } ) ;
12721162 } ) ;
1273- if ( firstTotalRatioIndex !== - 1 && frameIndex >= firstTotalRatioIndex ) {
1274- traces . push ( {
1275- x : frameTimestamps ,
1276- y : totalRatio . slice ( 0 , frameIndex + 1 ) ,
1277- type : 'scatter' ,
1278- mode : 'lines' ,
1279- name : 'Total Heap/RSS Ratio' ,
1280- line : { color : '#2c3e50' , width : 4 } ,
1281- connectgaps : false
1282- } ) ;
1283- }
12841163 if ( compareData ) {
12851164 compareData . processKeys . forEach ( processKey => {
12861165 const def = compareData . series [ processKey ] ;
@@ -1296,17 +1175,6 @@ <h3>Heap/RSS Ratio Over Time</h3>
12961175 connectgaps : false
12971176 } ) ;
12981177 } ) ;
1299- if ( compareData . firstTotalRatioIndex !== - 1 && frameIndex >= compareData . firstTotalRatioIndex ) {
1300- traces . push ( {
1301- x : frameTimestamps ,
1302- y : compareData . totalRatio . slice ( 0 , frameIndex + 1 ) ,
1303- type : 'scatter' ,
1304- mode : 'lines' ,
1305- name : 'Compare Total Heap/RSS Ratio' ,
1306- line : { color : '#0f172a' , width : 3 , dash : 'dot' } ,
1307- connectgaps : false
1308- } ) ;
1309- }
13101178 }
13111179 return traces ;
13121180 }
@@ -1609,35 +1477,11 @@ <h3>Heap/RSS Ratio Over Time</h3>
16091477 totalHeap . push ( hasAny ? totalHeapValue : null ) ;
16101478 } ) ;
16111479
1612- const totalRatio = totalRss . map ( ( rssValue , index ) => {
1613- const heapValue = totalHeap [ index ] ;
1614- if ( ! rssValue || rssValue === 0 || heapValue === null ) return null ;
1615- return heapValue / rssValue ;
1616- } ) ;
1617-
1618- const totalGc = timestamps . map ( timestamp => {
1619- let total = 0 ;
1620- let hasAny = false ;
1621- processKeys . forEach ( processKey => {
1622- const [ processName , pid ] = processKey . split ( '|' ) ;
1623- const sample = samples . find ( s => s . Name === processName && s . PID === pid && s . Timestamp === timestamp ) ;
1624- if ( sample && sample . GCTime && sample . GCTime > 0 ) {
1625- total += sample . GCTime / 1000 ;
1626- hasAny = true ;
1627- }
1628- } ) ;
1629- return hasAny ? total : null ;
1630- } ) ;
1631-
16321480 return {
16331481 processKeys,
16341482 series,
16351483 totalRss,
1636- totalRatio,
1637- totalGc,
1638- firstTotalRssIndex : totalRss . findIndex ( value => value !== null ) ,
1639- firstTotalRatioIndex : totalRatio . findIndex ( value => value !== null ) ,
1640- firstTotalGcIndex : totalGc . findIndex ( value => value !== null )
1484+ firstTotalRssIndex : totalRss . findIndex ( value => value !== null )
16411485 } ;
16421486 }
16431487
0 commit comments