MediaWiki REL1_30
NullStatsdDataFactory.php
Go to the documentation of this file.
1<?php
2
3use Liuggio\StatsdClient\Entity\StatsdData;
4use Liuggio\StatsdClient\Entity\StatsdDataInterface;
5use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
6
12
19 public function timing( $key, $time ) {
20 }
21
28 public function gauge( $key, $value ) {
29 }
30
48 public function set( $key, $value ) {
49 return [];
50 }
51
59 public function increment( $key ) {
60 return [];
61 }
62
71 public function decrement( $key ) {
72 return [];
73 }
74
83 public function updateCount( $key, $delta ) {
84 return [];
85 }
86
97 public function produceStatsdData(
98 $key,
99 $value = 1,
100 $metric = StatsdDataInterface::STATSD_METRIC_COUNT
101 ) {
102 $data = new StatsdData();
103 $data->setKey( $key );
104 $data->setValue( $value );
105 $data->setMetric( $metric );
106 return $data;
107 }
108
113 public function hasData() {
114 return false;
115 }
116
121 public function getData() {
122 return [];
123 }
124
130 public function setEnabled( $enabled ) {
131 // Nothing to do, null factory is always disabled.
132 }
133}
decrement( $key)
This function creates a 'decrement' StatsdData object.
gauge( $key, $value)
This function creates a 'gauge' StatsdData.
setEnabled( $enabled)
Set collection enable status.
increment( $key)
This function creates a 'increment' StatsdData object.
produceStatsdData( $key, $value=1, $metric=StatsdDataInterface::STATSD_METRIC_COUNT)
Produce a StatsdDataInterface Object.
getData()
Return data from the factory.
timing( $key, $time)
This function creates a 'timing' StatsdData.
hasData()
Check whether this data factory has any data.
updateCount( $key, $delta)
This function creates a 'updateCount' StatsdData object.
see documentation in includes Linker php for Linker::makeImageLink & $time
Definition hooks.txt:1778
MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.