public function DatabaseDataCollector::getColorCode in Devel 8.3
Same name and namespace in other branches
- 8 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getColorCode()
- 8.2 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getColorCode()
- 4.x webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::getColorCode()
Returns a color based on the number of executed queries.
Return value
string
File
- webprofiler/
src/ DataCollector/ DatabaseDataCollector.php, line 141
Class
- DatabaseDataCollector
- Class DatabaseDataCollector.
Namespace
Drupal\webprofiler\DataCollectorCode
public function getColorCode() {
if ($this
->getQueryCount() < 100) {
return 'green';
}
if ($this
->getQueryCount() < 200) {
return 'yellow';
}
return 'red';
}