Merge branch '2.4' into develop

pull/9715/head
iglocska 2024-04-23 15:08:50 +02:00
commit 91e1c27746
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 6 additions and 4 deletions

View File

@ -15,9 +15,6 @@ class BenchmarkTool
/** @var retention */
private $retention = 0;
/** @var start_time */
public $start_timexxx;
const BENCHMARK_SCOPES = ['user', 'endpoint', 'user_agent'];
const BENCHMARK_FIELDS = ['time', 'sql_time', 'sql_queries', 'memory'];
const BENCHMARK_UNITS = [

View File

@ -152,7 +152,9 @@ class MysqlExtended extends Mysql
public function execute($sql, $options = [], $params = [])
{
$log = $options['log'] ?? $this->fullDebug;
if (Configure::read('Plugin.Benchmarking_enable')) {
$log = true;
}
if ($log) {
$t = microtime(true);
$this->_result = $this->_execute($sql, $params);

View File

@ -144,6 +144,9 @@ class MysqlObserverExtended extends Mysql
public function execute($sql, $options = [], $params = [])
{
$log = $options['log'] ?? $this->fullDebug;
if (Configure::read('Plugin.Benchmarking_enable')) {
$log = true;
}
$comment = sprintf(
'%s%s%s',
empty(Configure::read('CurrentUserId')) ? '' : sprintf(