public function StopwatchEvent::getMemory in Devel 8.3
Same name and namespace in other branches
- 8 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
int The memory usage (in bytes).
File
- webprofiler/
src/ Stopwatch.php, line 502
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;
}