original_string: public function getDatabaseUsageSummary()
      {
          Piwik::checkUserHasSuperUserAccess();
  
          $emptyRow = array('data_size' => 0, 'index_size' => 0, 'row_count' => 0);
          $rows = array(
              'tracker_data' => $emptyRow,
              'metric_data'  => $emptyRow,
              'report_data'  => $emptyRow,
              'other_data'   => $emptyRow
          );
  
          foreach ($this->metadataProvider->getAllTablesStatus() as $status) {
              if ($this->isNumericArchiveTable($status['Name'])) {
                  $rowToAddTo = & $rows['metric_data'];
              } else if ($this->isBlobArchiveTable($status['Name'])) {
                  $rowToAddTo = & $rows['report_data'];
              } else if ($this->isTrackerTable($status['Name'])) {
                  $rowToAddTo = & $rows['tracker_data'];
              } else {
                  $rowToAddTo = & $rows['other_data'];
              }
  
              $rowToAddTo['data_size'] += $status['Data_length'];
              $rowToAddTo['index_size'] += $status['Index_length'];
              $rowToAddTo['row_count'] += $status['Rows'];
          }
  
          return DataTable::makeFromIndexedArray($rows);
      }
code: public function getDatabaseUsageSummary()
      {
          Piwik::checkUserHasSuperUserAccess();
  
          $emptyRow = array('data_size' => 0, 'index_size' => 0, 'row_count' => 0);
          $rows = array(
              'tracker_data' => $emptyRow,
              'metric_data'  => $emptyRow,
              'report_data'  => $emptyRow,
              'other_data'   => $emptyRow
          );
  
          foreach ($this->metadataProvider->getAllTablesStatus() as $status) {
              if ($this->isNumericArchiveTable($status['Name'])) {
                  $rowToAddTo = & $rows['metric_data'];
              } else if ($this->isBlobArchiveTable($status['Name'])) {
                  $rowToAddTo = & $rows['report_data'];
              } else if ($this->isTrackerTable($status['Name'])) {
                  $rowToAddTo = & $rows['tracker_data'];
              } else {
                  $rowToAddTo = & $rows['other_data'];
              }
  
              $rowToAddTo['data_size'] += $status['Data_length'];
              $rowToAddTo['index_size'] += $status['Index_length'];
              $rowToAddTo['row_count'] += $status['Rows'];
          }
  
          return DataTable::makeFromIndexedArray($rows);
      }
code_tokens: public function getDatabaseUsageSummary ( ) { Piwik :: checkUserHasSuperUserAccess ( ) ; $ emptyRow = array ( 'data_size' => 0 , 'index_size' => 0 , 'row_count' => 0 ) ; $ rows = array ( 'tracker_data' => $ emptyRow , 'metric_data' => $ emptyRow , 'report_data' => $ emptyRow , 'other_data' => $ emptyRow ) ; foreach ( $ this -> metadataProvider -> getAllTablesStatus ( ) as $ status ) { if ( $ this -> isNumericArchiveTable ( $ status [ 'Name' ] ) ) { $ rowToAddTo = & $ rows [ 'metric_data' ] ; } else if ( $ this -> isBlobArchiveTable ( $ status [ 'Name' ] ) ) { $ rowToAddTo = & $ rows [ 'report_data' ] ; } else if ( $ this -> isTrackerTable ( $ status [ 'Name' ] ) ) { $ rowToAddTo = & $ rows [ 'tracker_data' ] ; } else { $ rowToAddTo = & $ rows [ 'other_data' ] ; } $ rowToAddTo [ 'data_size' ] += $ status [ 'Data_length' ] ; $ rowToAddTo [ 'index_size' ] += $ status [ 'Index_length' ] ; $ rowToAddTo [ 'row_count' ] += $ status [ 'Rows' ] ; } return DataTable :: makeFromIndexedArray ( $ rows ) ; }
docstring: Returns a datatable summarizing how data is distributed among Matomo tables.
  
  This function will group tracker tables, numeric archive tables, blob archive tables
  and other tables together so only four rows are shown.
  
  @return DataTable A datatable with three columns: 'data_size', 'index_size', 'row_count'.
docstring_tokens: Returns a datatable summarizing how data is distributed among Matomo tables .