* @file
* @ingroup Profiler
*/
+use MediaWiki\MediaWikiServices;
/**
* ProfilerOutput class that flushes profiling data to the profiling
* @param array $stats
*/
public function log( array $stats ) {
- $prefix = isset( $this->params['prefix'] ) ? $this->params['prefix'] : '';
- $contextStats = $this->collector->getContext()->getStats();
+ $prefix = $this->params['prefix'] ?? '';
+ $contextStats = MediaWikiServices::getInstance()->getStatsdDataFactory();
foreach ( $stats as $stat ) {
$key = "{$prefix}.{$stat['name']}";