public class AdaptiveSampleFilter extends SampleFilter
SampleFilter that changes the sample rate dynamically to meet a given
target.| Modifier and Type | Field and Description |
|---|---|
protected Clock |
clock
The clock to use to get the current time.
|
sampleRate| Constructor and Description |
|---|
AdaptiveSampleFilter(double sampleRate,
Integer targetCount,
Integer targetTimeValue,
TimeUnit targetTimeUnit)
Initialises the sample filter with a specified initial sample rate and
target.
|
protected Clock clock
public AdaptiveSampleFilter(double sampleRate,
Integer targetCount,
Integer targetTimeValue,
TimeUnit targetTimeUnit)
sampleRate - the initial rate at which to sample requests.targetCount - the target number of requests to match in a time
frame.targetTimeValue - the value for the time frame.targetTimeUnit - the unit of the value for the time frame.public boolean sample()
SampleFiltersample in class SampleFilterCopyright © 2019. All rights reserved.