original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Print profiling report for the tracker
  
  @param \Piwik\Db $db Tracker database object (or null)
docstring_tokens: Print profiling report for the tracker