Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1432660
MockMetrics.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MockMetrics.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Wikimedia\Parsoid\Mocks
;
use
Liuggio\StatsdClient\Entity\StatsdDataInterface
;
use
Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface
;
class
MockMetrics
implements
StatsdDataFactoryInterface
{
/** @var array */
public
$log
;
/** @inheritDoc */
public
function
timing
(
$key
,
$time
)
{
$this
->
log
[]
=
[
'timing'
,
$key
,
$time
];
}
/** @inheritDoc */
public
function
gauge
(
$key
,
$value
)
{
$this
->
log
[]
=
[
'gauge'
,
$key
,
$value
];
}
/** @inheritDoc */
public
function
set
(
$key
,
$value
)
{
$this
->
log
[]
=
[
'set'
,
$key
,
$value
];
return
[];
}
/** @inheritDoc */
public
function
increment
(
$key
)
{
$this
->
log
[]
=
[
'increment'
,
$key
];
return
[];
}
/** @inheritDoc */
public
function
decrement
(
$key
)
{
$this
->
log
[]
=
[
'decrement'
,
$key
];
return
[];
}
/** @inheritDoc */
public
function
updateCount
(
$key
,
$delta
)
{
$this
->
log
[]
=
[
'updateCount'
,
$key
,
$delta
];
return
[];
}
/** @inheritDoc */
public
function
produceStatsdData
(
$key
,
$value
=
1
,
$metric
=
StatsdDataInterface
::
STATSD_METRIC_COUNT
)
{
// @phan-suppress-next-line PhanTypeMismatchReturn FIXME, phan seems right
return
$metric
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 22:08 (22 h, 34 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
32/5a/525b3eb91a8a4cf3dc3bc124baf7
Default Alt Text
MockMetrics.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment