Gauge/ProcessesGauge.php
protected function aggregateMemory($processes)
    {
        $memory = array();

        foreach ($processes as $process) {
            if (isset($memory[$process->getName()])) {
                $memory[$process->getName()] += $process->getMemory();
            }
            else {
                $memory[$process->getName()] = $process->getMemory();
            }
        }

        return $memory;
    }
protected function aggregateMemory($processes)
    {
        $memory = array();

        foreach ($processes as $process) {
            if (isset($memory[$process->getName()])) {
                $memory[$process->getName()] += $process->getMemory();
            }
            else {
                $memory[$process->getName()] = $process->getMemory();
            }
        }

        return $memory;
    }
protected function aggregateMemory ( $ processes ) { $ memory = array ( ) ; foreach ( $ processes as $ process ) { if ( isset ( $ memory [ $ process -> getName ( ) ] ) ) { $ memory [ $ process -> getName ( ) ] += $ process -> getMemory ( ) ; } else { $ memory [ $ process -> getName ( ) ] = $ process -> getMemory ( ) ; } } return $ memory ; }
Aggregate memory for processes with the same name

@param $processes Process[]
@return array
Aggregate memory for processes with the same name