public function StopwatchEvent::getMemory in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getMemory()
- 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getMemory()
- 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getMemory()
Gets the max memory usage of all periods.
Return value
integer The memory usage (in bytes)
File
- webprofiler/
src/ Stopwatch.php, line 448
Class
- StopwatchEvent
- Class StopwatchEvent
Namespace
Drupal\webprofilerCode
public function getMemory() {
$memory = 0;
foreach ($this->periods as $period) {
if ($period
->getMemory() > $memory) {
$memory = $period
->getMemory();
}
}
return $memory;
}