From 487265cd1751a3fa5670658e2ad3f12521d8a38c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 7 Dec 2015 19:49:38 +0000 Subject: [PATCH] Remove unused $wgStatsMethod and related UDPProfiler variables All unused: * $wgProfileCallTree * $wgProfilePerHost * $wgUDPProfilerHost * $wgUDPProfilerPort * $wgUDPProfilerFormatString * $wgStatsMethod * $wgAggregateStatsID * $wgStatsFormatString The only one still used was $wgProfilePerHost. Also move release notes for ade945b97a51 from HISTORY to RELEASE-NOTES (Oops!) Change-Id: Ia0280d23674ace1ac33aa561b06ee73cab865b29 --- HISTORY | 2 - RELEASE-NOTES-1.27 | 5 ++ includes/DefaultSettings.php | 73 ------------------- includes/profiler/output/ProfilerOutputDb.php | 3 - 4 files changed, 5 insertions(+), 78 deletions(-) diff --git a/HISTORY b/HISTORY index 7e72fc78e5..e9de01ab2c 100644 --- a/HISTORY +++ b/HISTORY @@ -243,8 +243,6 @@ changes to languages because of Phabricator reports. * DatabaseBase::errorCount() was removed (unused). * $wgDeferredUpdateList was removed. * DeferredUpdates::addHTMLCacheUpdate() was removed. -* Obsolete maintenance scripts clearCacheStats.php and showCacheStats.php - were removed. The underlying data is sent to StatsD (see $wgStatsdServer). == MediaWiki 1.25 == diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index ead82f3bb2..c27fb0f754 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -54,6 +54,9 @@ production. * $wgRateLimitLog was removed; use $wgDebugLogGroups['ratelimit'] instead. * Deprecated API formats dbg, txt, and yaml have been removed. * CLDRPluralRule* classes have been replaced with wikimedia/cldr-plural-rule-parser. +* Removed $wgProfilePerHost, $wgUDPProfilerHost, $wgUDPProfilerPort, + $wgUDPProfilerFormatString, $wgStatsMethod, $wgAggregateStatsID, $wgStatsFormatString, + and $wgProfileCallTree (deprecated since 1.20). === New features in 1.27 === * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as @@ -162,6 +165,8 @@ changes to languages because of Phabricator reports. * ResourceLoader::getLessCompiler() now takes an optional parameter of additional LESS variables to set for the compiler. * wfBaseConvert() marked as deprecated, use Wikimedia\base_convert() directly instead. +* Obsolete maintenance scripts clearCacheStats.php and showCacheStats.php + were removed. The underlying data is sent to StatsD (see $wgStatsdServer). == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ee8c8c7b65..de364a67e0 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5685,79 +5685,6 @@ $wgProfileLimit = 0.0; */ $wgProfileOnly = false; -/** - * If true, print a raw call tree instead of per-function report - */ -$wgProfileCallTree = false; - -/** - * Should application server host be put into profiling table - * - * @deprecated set $wgProfiler['perhost'] = true instead - */ -$wgProfilePerHost = null; - -/** - * Host for UDP profiler. - * - * The host should be running a daemon which can be obtained from MediaWiki - * Git at: - * https://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile - * - * @deprecated set $wgProfiler['udphost'] instead - */ -$wgUDPProfilerHost = null; - -/** - * Port for UDP profiler. - * @see $wgUDPProfilerHost - * - * @deprecated set $wgProfiler['udpport'] instead - */ -$wgUDPProfilerPort = null; - -/** - * Format string for the UDP profiler. The UDP profiler invokes sprintf() with - * (profile id, count, cpu, cpu_sq, real, real_sq, entry name, memory) as - * arguments. You can use sprintf's argument numbering/swapping capability to - * repeat, re-order or omit fields. - * - * @see $wgStatsFormatString - * @since 1.22 - * - * @deprecated set $wgProfiler['udpformat'] instead - */ -$wgUDPProfilerFormatString = null; - -/** - * Destination for wfIncrStats() data... - * 'cache' to go into the system cache, if enabled (memcached) - * 'udp' to be sent to the UDP profiler (see $wgUDPProfilerHost) - * false to disable - */ -$wgStatsMethod = 'cache'; - -/** - * When $wgStatsMethod is 'udp', setting this to a string allows statistics to - * be aggregated over more than one wiki. The string will be used in place of - * the DB name in outgoing UDP packets. If this is set to false, the DB name - * will be used. - */ -$wgAggregateStatsID = false; - -/** - * When $wgStatsMethod is 'udp', this variable specifies how stats should be - * formatted. Its value should be a format string suitable for a sprintf() - * invocation with (id, count, key) arguments, where 'id' is either - * $wgAggregateStatsID or the DB name, 'count' is the value by which the metric - * is being incremented, and 'key' is the metric name. - * - * @see $wgUDPProfilerFormatString - * @see $wgAggregateStatsID - * @since 1.22 - */ -$wgStatsFormatString = "stats/%s - %s 1 1 1 1 %s\n"; - /** * Destination of statsd metrics. * diff --git a/includes/profiler/output/ProfilerOutputDb.php b/includes/profiler/output/ProfilerOutputDb.php index 76d62d2e95..5efb3ab241 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; } } -- 2.20.1