@@ -53,23 +53,23 @@ export function MemoryViewer({
5353 warningThreshold = 60 ,
5454 dangerThreshold = 80 ,
5555} : MemoryProgressViewerProps ) {
56- const value = stats . AnonRss ?? calculateAllocatedMemory ( stats ) ;
56+ const memoryUsage = stats . AnonRss ?? calculateAllocatedMemory ( stats ) ;
5757
5858 const capacity = stats . HardLimit ;
5959
6060 const theme = useTheme ( ) ;
6161 let fillWidth =
62- Math . round ( ( parseFloat ( String ( value ) ) / parseFloat ( String ( capacity ) ) ) * 100 ) || 0 ;
62+ Math . round ( ( parseFloat ( String ( memoryUsage ) ) / parseFloat ( String ( capacity ) ) ) * 100 ) || 0 ;
6363 fillWidth = fillWidth > 100 ? 100 : fillWidth ;
64- let valueText : number | string | undefined = value ,
64+ let valueText : number | string | undefined = memoryUsage ,
6565 capacityText : number | string | undefined = capacity ,
6666 divider = '/' ;
6767 if ( percents ) {
6868 valueText = fillWidth + '%' ;
6969 capacityText = '' ;
7070 divider = '' ;
7171 } else if ( formatValues ) {
72- [ valueText , capacityText ] = formatValues ( Number ( value ) , Number ( capacity ) ) ;
72+ [ valueText , capacityText ] = formatValues ( Number ( memoryUsage ) , Number ( capacity ) ) ;
7373 }
7474
7575 const renderContent = ( ) => {
@@ -81,13 +81,13 @@ export function MemoryViewer({
8181 } ;
8282
8383 const calculateMemoryShare = ( segmentSize : number ) => {
84- if ( ! value ) {
84+ if ( ! memoryUsage ) {
8585 return 0 ;
8686 }
8787 return ( segmentSize / parseFloat ( String ( capacity ) ) ) * 100 ;
8888 } ;
8989
90- const memorySegments = getMemorySegments ( stats ) ;
90+ const memorySegments = getMemorySegments ( stats , Number ( memoryUsage ) ) ;
9191
9292 const status = calculateProgressStatus ( {
9393 fillWidth,
0 commit comments