public class ServiceScore extends Object implements Comparable<ServiceScore>
LoadBalancerService.UpdateTask
. ServiceScore
s are a
resource utilization measure. They are higher for a service
which is more highly utilized. There are several ways to look at the
score, including the rawScore
, the rank
, and the
normalized double-precision rank
. The ranks move in the
same direction as the rawScore
s - a higher rank indicates
higher utilization. The least utilized service is always rank zero (0).
The most utilized service is always in the last rank.Modifier and Type | Field and Description |
---|---|
double |
drank
The normalized double precision rank in [0.0:1.0].
|
String |
hostname |
int |
rank
The rank in [0:#scored].
|
double |
rawScore
The raw score computed for that service.
|
double |
score
The normalized score computed for that service.
|
String |
serviceName |
UUID |
serviceUUID |
Constructor and Description |
---|
ServiceScore(String hostname,
UUID serviceUUID,
String serviceName)
Constructor variant used when you do not have performance counters
for the service and could not compute its rawScore.
|
ServiceScore(String hostname,
UUID serviceUUID,
String serviceName,
double rawScore)
Constructor variant used when you have computed the rawStore.
|
public final String hostname
public final UUID serviceUUID
public final String serviceName
public final double rawScore
public double score
public int rank
public double drank
public ServiceScore(String hostname, UUID serviceUUID, String serviceName)
hostname
- serviceUUID
- public int compareTo(ServiceScore arg0)
rawScore
. The
serviceUUID
is used to break any ties.compareTo
in interface Comparable<ServiceScore>
public static double normalize(double rawScore, double totalRawScore)
rawScore
- The raw score.totalRawScore
- The raw score computed from the totals.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.