FixedSizeReservoir
in package
implements
ExemplarReservoirInterface
FinalYes
Table of Contents
Interfaces
Properties
- $measurements : int
- $size : int
- $storage : BucketStorage
Methods
- __construct() : mixed
- collect() : array<string|int, Exemplar>
- offer() : void
Properties
$measurements
private
int
$measurements
= 0
$size read-only
private
int
$size
$storage read-only
private
BucketStorage
$storage
Methods
__construct()
public
__construct([int $size = 4 ]) : mixed
Parameters
- $size : int = 4
collect()
public
collect(array<string|int, mixed> $dataPointAttributes) : array<string|int, Exemplar>
Parameters
- $dataPointAttributes : array<string|int, mixed>
Return values
array<string|int, Exemplar>offer()
public
offer(mixed $index, mixed $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp) : void
Parameters
- $index : mixed
- $value : mixed
- $attributes : AttributesInterface
- $context : ContextInterface
- $timestamp : int