Currently names are segmented with a dash (for legacy reasons), which
makes them clutter the top-level MediaWiki.* metric namespace.
Change-Id: I785819723808368fbf9c3f5ea167f50f40733a3a
* @since 1.22
*/
public static function incrStats( $key, $type, $delta = 1 ) {
- wfIncrStats( $key, $delta );
- wfIncrStats( "{$key}-{$type}", $delta );
+ static $stats;
+ if ( !$stats ) {
+ $stats = RequestContext::getMain()->getStats();
+ }
+ $stats->updateCount( "jobqueue.{$key}", $delta );
+ $stats->updateCount( "jobqueue.{$key}.{$type}", $delta );
}
/**