Track top k nodes by norm score rather than top k nodes per scorer

This commit is contained in:
Preetha Appan
2018-08-17 18:44:00 -05:00
parent aa2b632a44
commit f6cbfbfef6
8 changed files with 116 additions and 85 deletions

View File

@@ -112,14 +112,15 @@ type AllocationMetric struct {
Scores map[string]float64
AllocationTime time.Duration
CoalescedFailures int
ScoreMetaData map[string][]*NodeScoreMeta
ScoreMetaData []*NodeScoreMeta
}
// NodeScoreMeta is used to serialize node scoring metadata
// displayed in the CLI during verbose mode
type NodeScoreMeta struct {
NodeID string
Score float64
NodeID string
Scores map[string]float64
NormScore float64
}
// AllocationListStub is used to return a subset of an allocation