Refactor Statsd classes to enable null collector to work.
authorStanislav Malyshev <smalyshev@gmail.com>
Fri, 26 May 2017 00:23:44 +0000 (17:23 -0700)
committerStanislav Malyshev <smalyshev@gmail.com>
Mon, 29 May 2017 22:33:02 +0000 (15:33 -0700)
commit7fdc3d09a3b6bbb7ae046f46e5dbf65fd7aca8e4
tree7fc671a2dd49f841606a87158510344a590d90e8
parent41438a38e2c515cf6ca95fdbaa7d193df7ef3186
Refactor Statsd classes to enable null collector to work.

The following changes are added:
- Created MediawikiStatsdDataFactory interface
- Added hasData() method to see if there are any data to send
- Added getData() method to fetch data
- Made service infrastructure use MediawikiStatsdDataFactory interface
- Made wfLogProfilingData() use MediawikiStatsdDataFactory interface
- Added capability to enable/disable buffering collector

Bug: T166354
Change-Id: I2874175647e987996a9a399829b3319674471aaa
autoload.php
includes/GlobalFunctions.php
includes/MediaWikiServices.php
includes/context/ContextSource.php
includes/context/DerivativeContext.php
includes/context/IContextSource.php
includes/context/RequestContext.php
includes/libs/stats/BufferingStatsdDataFactory.php
includes/libs/stats/MediawikiStatsdDataFactory.php [new file with mode: 0644]
includes/libs/stats/NullStatsdDataFactory.php
tests/phpunit/includes/MediaWikiServicesTest.php