public static function memoryUsage(string $point_name) : string
    {
        if (isset(Debug::$memory[$point_name])) {
            $unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');
            $size = memory_get_usage() - Debug::$memory[$point_name];
            $memory_usage = @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
            return $memory_usage;
        }
    }
public static function memoryUsage(string $point_name) : string
    {
        if (isset(Debug::$memory[$point_name])) {
            $unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');
            $size = memory_get_usage() - Debug::$memory[$point_name];
            $memory_usage = @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
            return $memory_usage;
        }
    }
public static function memoryUsage ( string $ point_name ) : string { if ( isset ( Debug :: $ memory [ $ point_name ] ) ) { $ unit = array ( 'B' , 'KB' , 'MB' , 'GB' , 'TiB' , 'PiB' ) ; $ size = memory_get_usage ( ) - Debug :: $ memory [ $ point_name ] ; $ memory_usage = @ round ( $ size / pow ( 1024 , ( $ i = floor ( log ( $ size , 1024 ) ) ) ) , 2 ) . ' ' . $ unit [ ( $ i < 0 ? 0 : $ i ) ] ; return $ memory_usage ; } }
Get memory usage for current point

echo Debug::memoryUsage('point_name');

@param  string $point_name Point name
@return string
Get memory usage for current point