Write() directly into hash and use model.SeparatorByte.
This commit is contained in:
parent
645cf57bed
commit
7fefccd929
|
@ -375,8 +375,8 @@ func (node *ScalarFunctionCall) Eval(timestamp clientmodel.Timestamp) clientmode
|
||||||
func (node *VectorAggregation) labelsToGroupingKey(labels clientmodel.Metric) uint64 {
|
func (node *VectorAggregation) labelsToGroupingKey(labels clientmodel.Metric) uint64 {
|
||||||
summer := fnv.New64a()
|
summer := fnv.New64a()
|
||||||
for _, label := range node.groupBy {
|
for _, label := range node.groupBy {
|
||||||
fmt.Fprint(summer, labels[label])
|
summer.Write([]byte(labels[label]))
|
||||||
fmt.Fprint(summer, []byte{0})
|
summer.Write([]byte{clientmodel.SeparatorByte})
|
||||||
}
|
}
|
||||||
|
|
||||||
return summer.Sum64()
|
return summer.Sum64()
|
||||||
|
|
Loading…
Reference in New Issue