Package org.opensearch.index
Class ShardIndexingPressureTracker.PerformanceTracker
java.lang.Object
org.opensearch.index.ShardIndexingPressureTracker.PerformanceTracker
- Enclosing class:
- ShardIndexingPressureTracker
public static class ShardIndexingPressureTracker.PerformanceTracker
extends java.lang.Object
Performance Tracker is used to track the request performance statistics for every operation, per shard. This includes:
a. latencyInMillis - Total indexing time take by requests that were processed successfully for a shard.
b. lastSuccessfulRequestTimestamp - Timestamp of last successful request for a shard.
c. TotalOutstandingRequests - Total requests outstanding for a shard at any given point.
d. ThroughputMovingAverage - Total moving average throughput value for last N requests.
e. ThroughputMovingQueue - Queue that holds the last N requests throughput such that there exists a sliding window
which keeps moving everytime a new request comes. At any given point it tracks last N requests only.
EWMA cannot be used here as it evaluate the historical average, while here it just needs the average of last N requests.
-
Constructor Summary
Constructors Constructor Description PerformanceTracker()
-
Method Summary
Modifier and Type Method Description long
addLatencyInMillis(long latency)
boolean
addNewThroughout(java.lang.Double newThroughput)
java.lang.Double
getFirstThroughput()
long
getLastSuccessfulRequestTimestamp()
long
getLatencyInMillis()
long
getThroughputMovingAverage()
long
getThroughputMovingQueueSize()
long
getTotalOutstandingRequests()
long
incrementTotalOutstandingRequests()
void
resetTotalOutstandingRequests()
void
updateLastSuccessfulRequestTimestamp(long timeStamp)
long
updateThroughputMovingAverage(long newAvg)
-
Constructor Details
-
PerformanceTracker
public PerformanceTracker()
-
-
Method Details
-
getLatencyInMillis
public long getLatencyInMillis() -
addLatencyInMillis
public long addLatencyInMillis(long latency) -
getLastSuccessfulRequestTimestamp
public long getLastSuccessfulRequestTimestamp() -
updateLastSuccessfulRequestTimestamp
public void updateLastSuccessfulRequestTimestamp(long timeStamp) -
getTotalOutstandingRequests
public long getTotalOutstandingRequests() -
incrementTotalOutstandingRequests
public long incrementTotalOutstandingRequests() -
resetTotalOutstandingRequests
public void resetTotalOutstandingRequests() -
getThroughputMovingAverage
public long getThroughputMovingAverage() -
updateThroughputMovingAverage
public long updateThroughputMovingAverage(long newAvg) -
addNewThroughout
public boolean addNewThroughout(java.lang.Double newThroughput) -
getFirstThroughput
public java.lang.Double getFirstThroughput() -
getThroughputMovingQueueSize
public long getThroughputMovingQueueSize()
-