Merge pull request #18297 from kamil-tekiela/measure-time-only-for-user-queries

Measure time only for user queries
This commit is contained in:
Maurício Meneghini Fauth 2023-03-30 10:23:36 -03:00 committed by GitHub
commit ee9c9a0300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,11 +218,14 @@ class DatabaseInterface implements DbalInterface
$result = $this->extension->realQuery($query, $this->links[$link], $options);
if ($link === self::CONNECT_USER) {
$this->lastQueryExecutionTime = microtime(true) - $time;
}
if ($cache_affected_rows) {
$GLOBALS['cached_affected_rows'] = $this->affectedRows($link, false);
}
$this->lastQueryExecutionTime = microtime(true) - $time;
if ($debug) {
$errorMessage = $this->getError($link);
Utilities::debugLogQueryIntoSession(