Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/355485 )
Change subject: Disable stats collection for maintenance scripts. ...................................................................... Disable stats collection for maintenance scripts. Some long scripts collect tons of useless stats which makes them very slow, also maintenance stats are probably not the stats we're generally after. Bug: T165203 Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e --- M includes/Maintenance/Maintenance.php 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/85/355485/1 diff --git a/includes/Maintenance/Maintenance.php b/includes/Maintenance/Maintenance.php index 11fe094..33a71f8 100644 --- a/includes/Maintenance/Maintenance.php +++ b/includes/Maintenance/Maintenance.php @@ -6,6 +6,7 @@ use CirrusSearch\SearchConfig; use MediaWiki\MediaWikiServices; use CirrusSearch\UserTesting; +use MediaWiki\Services\CannotReplaceActiveServiceException; /** * Cirrus helpful extensions to Maintenance. @@ -202,5 +203,15 @@ // Don't skew the dashboards by logging these requests to // the global request log. $wgCirrusSearchLogElasticRequests = false; + // Disable statsd data collection. + try { + $services = \MediaWiki\MediaWikiServices::getInstance(); + $services->redefineService( "StatsdDataFactory", + function ( MediaWikiServices $services ) { + return new \NullStatsdDataFactory(); + } ); + } catch ( CannotReplaceActiveServiceException $e ) { + // ignore it, failing to disable stats is tolerable + } } } -- To view, visit https://gerrit.wikimedia.org/r/355485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Smalyshev <smalys...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits