yii\log\Logger::getDbProfiling PHP Метод

getDbProfiling() публичный Метод

The results returned include the number of SQL statements executed and the total time spent.
public getDbProfiling ( ) : array
Результат array the first element indicates the number of SQL statements executed, and the second element the total time spent in SQL execution.
    public function getDbProfiling()
    {
        $timings = $this->getProfiling(['yii\\db\\Command::query', 'yii\\db\\Command::execute']);
        $count = count($timings);
        $time = 0;
        foreach ($timings as $timing) {
            $time += $timing['duration'];
        }
        return [$count, $time];
    }