public class RateWindow extends Object
| Constructor and Description |
|---|
RateWindow(RateTimer timer,
int size,
long sampleRate)
Constructs a new instance of the RateWindow.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAverageRate()
Gets the average rate for the sample rate averaged across the whole window.
|
long |
getMaxRate()
Gets the maximum rate.
|
long |
getMinRate()
Gets the minimum rate.
|
void |
incrementForTimestamp(long timestamp)
Re-calculates the rate.
|
public RateWindow(RateTimer timer, int size, long sampleRate)
timer - An instance of a Timer.size - The size of the window.sampleRate - The sample rate for the window.public void incrementForTimestamp(long timestamp)
timestamp - The millisecond timestamp of the event.public double getAverageRate()
public long getMinRate()
public long getMaxRate()
Copyright © 2010–2023 Open Identity Platform Community. All rights reserved.