Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / profiler / output / ProfilerOutputStats.php
index 52aa54a..6041ba0 100644 (file)
@@ -21,6 +21,7 @@
  * @file
  * @ingroup Profiler
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * ProfilerOutput class that flushes profiling data to the profiling
@@ -37,8 +38,8 @@ class ProfilerOutputStats extends ProfilerOutput {
         * @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']}";