Merge "stats: Implement interface in BufferingStatsdDataFactory correctly"
This commit is contained in:
commit
0170d893a8
1 changed files with 6 additions and 4 deletions
|
|
@ -88,24 +88,26 @@ class BufferingStatsdDataFactory extends StatsdDataFactory implements IBuffering
|
|||
/**
|
||||
* @param string $key
|
||||
* @param float|int $value
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function set( $key, $value ) {
|
||||
if ( !$this->enabled ) {
|
||||
return;
|
||||
return [];
|
||||
}
|
||||
$this->buffer[] = [ $key, $value, StatsdDataInterface::STATSD_METRIC_SET ];
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function increment( $key ) {
|
||||
if ( !$this->enabled ) {
|
||||
return;
|
||||
return [];
|
||||
}
|
||||
$this->buffer[] = [ $key, 1, StatsdDataInterface::STATSD_METRIC_COUNT ];
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue