public function PerformanceTimingDataCollector::getData in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getData()
- 8.2 webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getData()
- 4.x webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getData()
Return value
mixed
Overrides DrupalDataCollectorInterface::getData
File
- webprofiler/
src/ DataCollector/ PerformanceTimingDataCollector.php, line 69
Class
- PerformanceTimingDataCollector
- Collects data about frontend performance.
Namespace
Drupal\webprofiler\DataCollectorCode
public function getData() {
$data = $this->data;
if (isset($this->data['performance'])) {
$performanceData = new PerformanceTimingData($this->data['performance']);
$data['performance']['computed']['DNS lookup time'] = $performanceData
->getDNSTiming();
$data['performance']['computed']['TCP handshake time'] = $performanceData
->getTCPTiming();
$data['performance']['computed']['Time to first byte'] = $performanceData
->getTtfbTiming();
$data['performance']['computed']['Data download time'] = $performanceData
->getDataTiming();
$data['performance']['computed']['DOM building time'] = $performanceData
->getDomTiming();
}
return $data;
}