Class NodeLabelStats
java.lang.Object
io.jenkins.plugins.smartexecutorloadbalancer.NodeLabelStats
- All Implemented Interfaces:
Serializable
Ring-buffer of recent build records for one (nodeName, labelExpression) combination.
The buffer size is controlled by
SmartLBConfig.getFailureThreshold() and is applied
each time a record is added.
Thread-safety: all mutating methods are synchronized.
Read-only accessors snapshot the list to avoid holding the lock.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecord(BuildRecord record, int maxSize) intPenalty score contribution from failure history.getLabel()intintgetNodeFaultCountInWindow(int threshold) Count of node faults in the most recentthresholdrecords.booleanisSuppressedForScheduling(int threshold) True when the most recentthresholdrecords are all node faults.
-
Constructor Details
-
NodeLabelStats
-
-
Method Details
-
addRecord
-
getNodeName
-
getLabel
-
getRecords
-
getNodeFaultCount
public int getNodeFaultCount() -
getNodeFaultCountInWindow
public int getNodeFaultCountInWindow(int threshold) Count of node faults in the most recentthresholdrecords. -
isSuppressedForScheduling
public boolean isSuppressedForScheduling(int threshold) True when the most recentthresholdrecords are all node faults. Only looks at the newestthresholdentries so that changing the threshold does not require flushing old history from the buffer. -
failurePenalty
public int failurePenalty()Penalty score contribution from failure history.
-