X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fprofiler%2Foutput%2FProfilerOutputDb.php;h=088721c0f77b30d29b4a97e27bc6004ce1241bbe;hb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;hp=76d62d2e95b0db15c6b32116e102bc155786816a;hpb=96366c1cf1966ca07e8f0b4361bbca28bfaf43a0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/output/ProfilerOutputDb.php b/includes/profiler/output/ProfilerOutputDb.php index 76d62d2e95..088721c0f7 100644 --- a/includes/profiler/output/ProfilerOutputDb.php +++ b/includes/profiler/output/ProfilerOutputDb.php @@ -33,13 +33,10 @@ class ProfilerOutputDb extends ProfilerOutput { public function __construct( Profiler $collector, array $params ) { parent::__construct( $collector, $params ); - global $wgProfilePerHost; // Initialize per-host profiling from config, back-compat if available if ( isset( $this->params['perHost'] ) ) { $this->perHost = $this->params['perHost']; - } elseif ( $wgProfilePerHost ) { - $this->perHost = $wgProfilePerHost; } } @@ -69,19 +66,19 @@ class ProfilerOutputDb extends ProfilerOutput { $memorySum = $memorySum >= 0 ? $memorySum : 0; $dbw->upsert( 'profiling', - array( + [ 'pf_name' => $name, 'pf_count' => $eventCount, 'pf_time' => $timeSum, 'pf_memory' => $memorySum, 'pf_server' => $pfhost - ), - array( array( 'pf_name', 'pf_server' ) ), - array( + ], + [ [ 'pf_name', 'pf_server' ] ], + [ "pf_count=pf_count+{$eventCount}", "pf_time=pf_time+{$timeSum}", "pf_memory=pf_memory+{$memorySum}", - ), + ], __METHOD__ ); }