You are here

public function DatabaseDataCollector::getTime in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getTime()
  2. 8.2 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getTime()
  3. 4.x webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getTime()

Returns the total execution time.

Return value

float

File

webprofiler/src/DataCollector/DatabaseDataCollector.php, line 125

Class

DatabaseDataCollector
Class DatabaseDataCollector

Namespace

Drupal\webprofiler\DataCollector

Code

public function getTime() {
  $time = 0;
  foreach ($this->data['queries'] as $query) {
    $time += $query['time'];
  }
  return $time;
}