Package org.apache.calcite.profile
Class ProfilerImpl.SurpriseQueue
- java.lang.Object
-
- org.apache.calcite.profile.ProfilerImpl.SurpriseQueue
-
- Enclosing class:
- ProfilerImpl
static class ProfilerImpl.SurpriseQueue extends java.lang.Object
A priority queue of the last N surprise values. Accepts a new value if the queue is not yet full, or if its value is greater than the median value over the last N.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
count
(package private) java.util.Deque<java.lang.Double>
deque
(package private) java.util.PriorityQueue<java.lang.Double>
priorityQueue
private int
size
private int
warmUpCount
-
Constructor Summary
Constructors Constructor Description SurpriseQueue(int warmUpCount, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
isValid()
(package private) boolean
offer(double d)
java.lang.String
toString()
-