MediaWiki master
Wikimedia\WRStats\RatePromise Class Reference

A WRStats query result promise. More...

Public Member Functions

 __construct (WRStatsReader $reader, string $name, EntityKey $entity, MetricSpec $metricSpec, SequenceSpec $seqSpec, TimeRange $range)
 
 perDay ()
 Get the counter value as a rate per day.
 
 perHour ()
 Get the counter value as a rate per hour.
 
 perMinute ()
 Get the counter value as a rate per minute.
 
 perSecond ()
 Get the counter value as a rate per second.
 
 total ()
 Get the total counter value summed over the specified time range.
 

Detailed Description

A WRStats query result promise.

It contains the input parameters to a query. When an accessor method is called, it triggers batch query execution in the parent WRStatsReader.

Since
1.39

Definition at line 12 of file RatePromise.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\WRStats\RatePromise::__construct ( WRStatsReader $reader,
string $name,
EntityKey $entity,
MetricSpec $metricSpec,
SequenceSpec $seqSpec,
TimeRange $range )
Access: internal
Use via WRStatsReader from WRStatsFactory::createReader instead
Parameters
WRStatsReader$reader
string$name
EntityKey$entity
MetricSpec$metricSpec
SequenceSpec$seqSpec
TimeRange$range

Definition at line 37 of file RatePromise.php.

Member Function Documentation

◆ perDay()

Wikimedia\WRStats\RatePromise::perDay ( )

Get the counter value as a rate per day.

Returns
float

Definition at line 103 of file RatePromise.php.

References Wikimedia\WRStats\RatePromise\perSecond().

◆ perHour()

Wikimedia\WRStats\RatePromise::perHour ( )

Get the counter value as a rate per hour.

Returns
float

Definition at line 94 of file RatePromise.php.

References Wikimedia\WRStats\RatePromise\perSecond().

◆ perMinute()

Wikimedia\WRStats\RatePromise::perMinute ( )

Get the counter value as a rate per minute.

Returns
float

Definition at line 85 of file RatePromise.php.

References Wikimedia\WRStats\RatePromise\perSecond().

◆ perSecond()

Wikimedia\WRStats\RatePromise::perSecond ( )

Get the counter value as a rate per second.

Returns
float

Definition at line 76 of file RatePromise.php.

References Wikimedia\WRStats\RatePromise\total().

Referenced by Wikimedia\WRStats\RatePromise\perDay(), Wikimedia\WRStats\RatePromise\perHour(), and Wikimedia\WRStats\RatePromise\perMinute().

◆ total()

Wikimedia\WRStats\RatePromise::total ( )

Get the total counter value summed over the specified time range.

Returns
float|int

Definition at line 58 of file RatePromise.php.

References Wikimedia\WRStats\RatePromise\total().

Referenced by Wikimedia\WRStats\RatePromise\perSecond(), and Wikimedia\WRStats\RatePromise\total().


The documentation for this class was generated from the following file: