35 public function log( array $stats ) {
36 $prefix = $this->params[
'prefix'] ??
'';
37 $contextStats = MediaWikiServices::getInstance()->getStatsdDataFactory();
39 foreach ( $stats as $stat ) {
40 $key =
"{$prefix}.{$stat['name']}";
43 $cpu = round( $stat[
'cpu'] * 1000 );
44 $real = round( $stat[
'real'] * 1000 );
46 $contextStats->increment(
"{$key}.calls" );
47 $contextStats->timing(
"{$key}.cpu", $cpu );
48 $contextStats->timing(
"{$key}.real", $real );
Flush profiling data to StatsD.
log(array $stats)
Flush profiling data to the current profiling context's stats buffer.
Base class for profiling output.