public function XmlSitemapGenerator::getMemoryUsage in XML sitemap 8
Same name and namespace in other branches
- 2.x src/XmlSitemapGenerator.php \Drupal\xmlsitemap\XmlSitemapGenerator::getMemoryUsage()
Get how much memory was used.
Parameters
bool $start: Start value.
Return value
int Used memory.
Overrides XmlSitemapGeneratorInterface::getMemoryUsage
File
- src/
XmlSitemapGenerator.php, line 206
Class
- XmlSitemapGenerator
- XmlSitemap generator service class.
Namespace
Drupal\xmlsitemapCode
public function getMemoryUsage($start = FALSE) {
$current = memory_get_peak_usage(TRUE);
if (!isset(self::$memoryStart) || $start) {
self::$memoryStart = $current;
}
return $current - self::$memoryStart;
}