function PerformanceTimingDataCollector::getPanelSummary
Overrides DrupalDataCollectorInterface::getPanelSummary
File
-
webprofiler/
src/ DataCollector/ PerformanceTimingDataCollector.php, line 50
Class
- PerformanceTimingDataCollector
- Collects data about frontend performance.
Namespace
Drupal\webprofiler\DataCollectorCode
public function getPanelSummary() {
if (isset($this->data['performance'])) {
$performanceData = new PerformanceTimingData($this->data['performance']);
return $this->t('TTFB: @ttfb', [
'@ttfb' => sprintf('%.0f ms', $performanceData->getTtfbTiming()),
]);
}
return NULL;
}