public class HostScore extends Object implements Comparable<HostScore>
LoadBalancerService.UpdateTask. HostScores are a
resource utilization measure. They are higher for a host 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 rawScores - a higher rank indicates
higher utilization. The least utilized host is always rank zero (0). The
most utilized host 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.
|
| Constructor and Description |
|---|
HostScore(String hostname)
Constructor variant used when you do not have performance counters
for the host and could not compute its rawScore.
|
HostScore(String hostname,
double rawScore)
Constructor variant used when you have computed the rawStore.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(HostScore arg0)
Places elements into order by ascending
rawScore (aka
increasing utilization). |
static double |
normalize(double rawScore,
double totalRawScore)
Normalizes a raw score in the context of totals for some host.
|
String |
toString() |
public final String hostname
public final double rawScore
public double score
public int rank
public double drank
public HostScore(String hostname)
hostname - public HostScore(String hostname, double rawScore)
hostname - rawScore - public int compareTo(HostScore arg0)
rawScore (aka
increasing utilization). The hostname is used to break any
ties.compareTo in interface Comparable<HostScore>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.