From 7fefccd92996688f9c1582762c497b699166541c Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Sat, 21 Feb 2015 17:19:13 +0100 Subject: [PATCH] Write() directly into hash and use model.SeparatorByte. --- rules/ast/ast.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/ast/ast.go b/rules/ast/ast.go index 7e891edd8..8eae7359a 100644 --- a/rules/ast/ast.go +++ b/rules/ast/ast.go @@ -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()