Pimcore\Db\Profiler::queryEnd PHP Method

queryEnd() public method

Intercept the query end and log the profiling data.
public queryEnd ( integer $queryId ) : void
$queryId integer
return void
    public function queryEnd($queryId)
    {
        $state = parent::queryEnd($queryId);
        if (!$this->getEnabled() || $state == self::IGNORED) {
            return;
        }
        $profile = $this->getQueryProfile($queryId);
        $this->_totalElapsedTime += $profile->getElapsedSecs();
        $this->_totalQueries++;
        $logEntry = $profile->getQuery() . " | " . implode(",", $profile->getQueryParams());
        Logger::debug($logEntry, ["connection" => $this->getConnectionId(), "queryNum" => $this->_totalQueries, "time" => (string) round($profile->getElapsedSecs(), 5)]);
        $this->queries[] = ["time" => $profile->getElapsedSecs(), "query" => $profile->getQuery() . " | " . implode(",", $profile->getQueryParams())];
    }