code: private function createMemoryElement($memory, \DOMDocument $dom)
      {
          $memory = round($memory / 1024 / 1024, 3);
  
          $memoryXML = $dom->createElement('memory');
          $memoryXML->setAttribute('value', (string) $memory);
          $memoryXML->setAttribute('unit', 'MB');
  
          return $memoryXML;
      }
docs: @param float        $memory
  @param \DOMDocument $dom
  
  @return \DOMElement