mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
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 {
|
||||
summer := fnv.New64a()
|
||||
for _, label := range node.groupBy {
|
||||
fmt.Fprint(summer, labels[label])
|
||||
fmt.Fprint(summer, []byte{0})
|
||||
summer.Write([]byte(labels[label]))
|
||||
summer.Write([]byte{clientmodel.SeparatorByte})
|
||||
}
|
||||
|
||||
return summer.Sum64()
|
||||
|
Loading…
Reference in New Issue
Block a user