public class WorkerMetricStats extends Object
Constructor and Description |
---|
WorkerMetricStats() |
Modifier and Type | Method and Description |
---|---|
double |
computePercentageToReachAverage(Map<String,Double> workerMetricToFleetLevelAverage)
Determines percentage of load to reach the mean for the worker.
|
boolean |
containsMetricStat(String workerMetricName)
Returns true if given is available for the current worker else false
|
void |
extrapolateMetricStatValuesForAddedLease(Map<String,Double> workerMetricToFleetLevelAverage,
int averageLeaseCount)
Increase the metric stat value corresponding to the added single lease.
|
void |
extrapolateMetricStatValuesForAddedThroughput(Map<String,Double> workerMetricsToFleetLevelAverageMap,
double averageThroughput,
double increaseThroughput,
double averageLeaseCount)
Increase the WorkerMetricStats value by given increaseLoadPercentage.
|
static List<software.amazon.awssdk.services.dynamodb.model.AttributeDefinition> |
getAttributeDefinitions() |
static List<software.amazon.awssdk.services.dynamodb.model.KeySchemaElement> |
getKeySchema() |
double |
getMetricStat(String workerMetricName)
Returns the value for given WorkerMetricStats name.
|
boolean |
isAnyWorkerMetricAboveAverageUtilizationOrOperatingRange(Map<String,Double> workerMetricToFleetLevelAverage) |
boolean |
isAnyWorkerMetricFailing()
Returns true if any of the metric stat values has -1 in last index which represents that the metric stat value
was not successfully fetched in last attempt by worker.
|
boolean |
isUsingDefaultWorkerMetric()
If a worker is not using an explicit WorkerMetric such as CPU, Memory, or Network, then it
is said to be using the default WorkerMetric.
|
boolean |
isValidWorkerMetric()
WorkerMetricStats entry is invalid
if any of the field from lastUpdateTime, operatingRange, resourcesStats are not present or
if resourcesStats is empty or
if any of the WorkerMetrics having resourceStats does not have operatingRange or
if operating range values are not present or
if maxUtilization is 0 for any WorkerMetric
|
boolean |
isWorkerMetricAboveOperatingRange(String workerMetricName)
Evaluates if the given metric stat is above operatingRange for the given WorkerMetric name.
|
boolean |
willAnyMetricStatsGoAboveAverageUtilizationOrOperatingRange(Map<String,Double> workerMetricsToFleetLevelAverageMap,
double averageThroughput,
double increaseThroughput,
double averageLeaseCount) |
public boolean containsMetricStat(String workerMetricName)
public double getMetricStat(String workerMetricName)
public void extrapolateMetricStatValuesForAddedThroughput(Map<String,Double> workerMetricsToFleetLevelAverageMap, double averageThroughput, double increaseThroughput, double averageLeaseCount)
public boolean willAnyMetricStatsGoAboveAverageUtilizationOrOperatingRange(Map<String,Double> workerMetricsToFleetLevelAverageMap, double averageThroughput, double increaseThroughput, double averageLeaseCount)
public void extrapolateMetricStatValuesForAddedLease(Map<String,Double> workerMetricToFleetLevelAverage, int averageLeaseCount)
public double computePercentageToReachAverage(Map<String,Double> workerMetricToFleetLevelAverage)
workerMetricToFleetLevelAverage
- : WorkerMetric to fleet level mean value.public boolean isAnyWorkerMetricFailing()
public boolean isValidWorkerMetric()
public boolean isAnyWorkerMetricAboveAverageUtilizationOrOperatingRange(Map<String,Double> workerMetricToFleetLevelAverage)
public boolean isUsingDefaultWorkerMetric()
public boolean isWorkerMetricAboveOperatingRange(String workerMetricName)
workerMetricName
- WorkerMetric name to evaluatepublic static List<software.amazon.awssdk.services.dynamodb.model.KeySchemaElement> getKeySchema()
public static List<software.amazon.awssdk.services.dynamodb.model.AttributeDefinition> getAttributeDefinitions()
Copyright © 2025. All rights reserved.