src/Aggregator.php
public function average()
    {
        $flat = $this->flatten();

        $avg = array();
        foreach ($flat as $metric => $values) {
            $avg[$metric] = (float) number_format(array_sum($values) / count($values), 2, '.', '');
        }

        return $avg;
    }
public function average()
    {
        $flat = $this->flatten();

        $avg = array();
        foreach ($flat as $metric => $values) {
            $avg[$metric] = (float) number_format(array_sum($values) / count($values), 2, '.', '');
        }

        return $avg;
    }
public function average ( ) { $ flat = $ this -> flatten ( ) ; $ avg = array ( ) ; foreach ( $ flat as $ metric => $ values ) { $ avg [ $ metric ] = ( float ) number_format ( array_sum ( $ values ) / count ( $ values ) , 2 , '.' , '' ) ; } return $ avg ; }
Get metric averages.

@return float[]
Get metric averages .