function DatabaseDataCollector::getColorCode

Returns a color based on the number of executed queries.

Return value

string

File

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

Class

DatabaseDataCollector
Class DatabaseDataCollector

Namespace

Drupal\webprofiler\DataCollector

Code

public function getColorCode() {
    if ($this->getQueryCount() < 100) {
        return 'green';
    }
    if ($this->getQueryCount() < 200) {
        return 'yellow';
    }
    return 'red';
}