App Metrics Fork me on GitHub
Show / Hide Table of Contents

Class DefaultSlidingWindowReservoir

A Reservoir implementation backed by a sliding window that stores only the measurements made in the last N seconds (or other time unit).

Inheritance
System.Object
DefaultSlidingWindowReservoir
Namespace:App.Metrics.ReservoirSampling.SlidingWindow
Assembly:cs.temp.dll.dll
Syntax
public sealed class DefaultSlidingWindowReservoir : IReservoir

Constructors

DefaultSlidingWindowReservoir()

Initializes a new instance of the DefaultSlidingWindowReservoir class.

Declaration
public DefaultSlidingWindowReservoir()

DefaultSlidingWindowReservoir(Int32)

Initializes a new instance of the DefaultSlidingWindowReservoir class.

Declaration
public DefaultSlidingWindowReservoir(int sampleSize)
Parameters
Type Name Description
System.Int32 sampleSize

The number of samples to keep in the sampling reservoir

Methods

GetSnapshot()

Declaration
public IReservoirSnapshot GetSnapshot()
Returns
Type Description
IReservoirSnapshot

GetSnapshot(Boolean)

Declaration
public IReservoirSnapshot GetSnapshot(bool resetReservoir)
Parameters
Type Name Description
System.Boolean resetReservoir
Returns
Type Description
IReservoirSnapshot

Reset()

Declaration
public void Reset()

Update(Int64)

Declaration
public void Update(long value)
Parameters
Type Name Description
System.Int64 value

Update(Int64, String)

Declaration
public void Update(long value, string userValue)
Parameters
Type Name Description
System.Int64 value
System.String userValue
Back to top Copyright © 2017 Allan Hardy
Generated by DocFX