From: Aaron Schulz Date: Sat, 18 Jun 2016 18:24:01 +0000 (-0700) Subject: Add statsd logging of DeferredUpdates X-Git-Tag: 1.31.0-rc.0~6566^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=67f74dcdb26dc0bf920b5c4f6c29622f92d1bbdf;p=lhc%2Fweb%2Fwiklou.git Add statsd logging of DeferredUpdates Bug: T137326 Change-Id: Icce439210c6412c1824d8d5c411880825bb05643 --- diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index e3b75704aa..1552777a80 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -126,8 +126,10 @@ class DeferredUpdates { } public static function execute( array &$queue, $mode ) { - $updates = $queue; // snapshot of queue + $stats = \MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory(); + $method = RequestContext::getMain()->getRequest()->getMethod(); + $updates = $queue; // snapshot of queue // Keep doing rounds of updates until none get enqueued while ( count( $updates ) ) { $queue = []; // clear the queue @@ -141,6 +143,7 @@ class DeferredUpdates { } else { $otherUpdates[] = $update; } + $stats->increment( 'deferred_updates.' . $method . '.' . get_class( $update ) ); } // Delegate DataUpdate execution to the DataUpdate class