public static function displayDbTrackerProfile($db = null)
    {
        if (is_null($db)) {
            $db = Tracker::getDatabase();
        }
        $tableName = Common::prefixTable('log_profiling');

        $all = $db->fetchAll('SELECT * FROM ' . $tableName);
        if ($all === false) {
            return;
        }
        uasort($all, 'self::maxSumMsFirst');

        $infoIndexedByQuery = array();
        foreach ($all as $infoQuery) {
            $query = $infoQuery['query'];
            $count = $infoQuery['count'];
            $sum_time_ms = $infoQuery['sum_time_ms'];
            $infoIndexedByQuery[$query] = array('count' => $count, 'sumTimeMs' => $sum_time_ms);
        }
        self::getSqlProfilingQueryBreakdownOutput($infoIndexedByQuery);
    }
public static function displayDbTrackerProfile($db = null)
    {
        if (is_null($db)) {
            $db = Tracker::getDatabase();
        }
        $tableName = Common::prefixTable('log_profiling');

        $all = $db->fetchAll('SELECT * FROM ' . $tableName);
        if ($all === false) {
            return;
        }
        uasort($all, 'self::maxSumMsFirst');

        $infoIndexedByQuery = array();
        foreach ($all as $infoQuery) {
            $query = $infoQuery['query'];
            $count = $infoQuery['count'];
            $sum_time_ms = $infoQuery['sum_time_ms'];
            $infoIndexedByQuery[$query] = array('count' => $count, 'sumTimeMs' => $sum_time_ms);
        }
        self::getSqlProfilingQueryBreakdownOutput($infoIndexedByQuery);
    }
public static function displayDbTrackerProfile ( $ db = null ) { if ( is_null ( $ db ) ) { $ db = Tracker :: getDatabase ( ) ; } $ tableName = Common :: prefixTable ( 'log_profiling' ) ; $ all = $ db -> fetchAll ( 'SELECT * FROM ' . $ tableName ) ; if ( $ all === false ) { return ; } uasort ( $ all , 'self::maxSumMsFirst' ) ; $ infoIndexedByQuery = array ( ) ; foreach ( $ all as $ infoQuery ) { $ query = $ infoQuery [ 'query' ] ; $ count = $ infoQuery [ 'count' ] ; $ sum_time_ms = $ infoQuery [ 'sum_time_ms' ] ; $ infoIndexedByQuery [ $ query ] = array ( 'count' => $ count , 'sumTimeMs' => $ sum_time_ms ) ; } self :: getSqlProfilingQueryBreakdownOutput ( $ infoIndexedByQuery ) ; }
Print profiling report for the tracker

@param \Piwik\Db $db Tracker database object (or null)
Print profiling report for the tracker