private function printAvgBlock($block)
    {
        if (!array_key_exists($block, $this->avgs)) {
            throw new \Exception('Average block '.$block.' not defined');
        }
        $this->finishAvgBlock($block);

        $output = "";
        $output .= "    $block";
        $output .= " [".$this->avgs[$block]['count']."]";
        $output .= " (".$this->avgs[$block]['start-line']."-".$this->avgs[$block]['stop-line'].")";
        $output .= ": ";
        $output .= round($this->avgs[$block]['avg'], 4);
        $output .= ' seconds';
        $output .= PHP_EOL;

        // Output max and min time
        $output .= "        max time: ".round($this->avgs[$block]['max-time'], 4).PHP_EOL;
        $output .= "        min time: ".round($this->avgs[$block]['min-time'], 4).PHP_EOL;

        return $output;
    }
private function printAvgBlock($block)
    {
        if (!array_key_exists($block, $this->avgs)) {
            throw new \Exception('Average block '.$block.' not defined');
        }
        $this->finishAvgBlock($block);

        $output = "";
        $output .= "    $block";
        $output .= " [".$this->avgs[$block]['count']."]";
        $output .= " (".$this->avgs[$block]['start-line']."-".$this->avgs[$block]['stop-line'].")";
        $output .= ": ";
        $output .= round($this->avgs[$block]['avg'], 4);
        $output .= ' seconds';
        $output .= PHP_EOL;

        // Output max and min time
        $output .= "        max time: ".round($this->avgs[$block]['max-time'], 4).PHP_EOL;
        $output .= "        min time: ".round($this->avgs[$block]['min-time'], 4).PHP_EOL;

        return $output;
    }
private function printAvgBlock ( $ block ) { if ( ! array_key_exists ( $ block , $ this -> avgs ) ) { throw new \ Exception ( 'Average block ' . $ block . ' not defined' ) ; } $ this -> finishAvgBlock ( $ block ) ; $ output = "" ; $ output .= "    $block" ; $ output .= " [" . $ this -> avgs [ $ block ] [ 'count' ] . "]" ; $ output .= " (" . $ this -> avgs [ $ block ] [ 'start-line' ] . "-" . $ this -> avgs [ $ block ] [ 'stop-line' ] . ")" ; $ output .= ": " ; $ output .= round ( $ this -> avgs [ $ block ] [ 'avg' ] , 4 ) ; $ output .= ' seconds' ; $ output .= PHP_EOL ; // Output max and min time $ output .= "        max time: " . round ( $ this -> avgs [ $ block ] [ 'max-time' ] , 4 ) . PHP_EOL ; $ output .= "        min time: " . round ( $ this -> avgs [ $ block ] [ 'min-time' ] , 4 ) . PHP_EOL ; return $ output ; }
Print average block

@param string $block - key to identify block

@return string output
@throws \Exception if block not defined
Print average block