function 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\webprofiler

Code

public function getMemory() {
    $memory = 0;
    foreach ($this->periods as $period) {
        if ($period->getMemory() > $memory) {
            $memory = $period->getMemory();
        }
    }
    return $memory;
}