From aec653aa70897c01c5df147d157745f29618dcbd Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 24 Aug 2020 15:09:27 +0200 Subject: [PATCH] fix: uint64 alignment in metrics/generic --- metrics/generic/generic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics/generic/generic.go b/metrics/generic/generic.go index ebde9c873..b69334507 100644 --- a/metrics/generic/generic.go +++ b/metrics/generic/generic.go @@ -18,9 +18,9 @@ import ( // Counter is an in-memory implementation of a Counter. type Counter struct { + bits uint64 // bits has to be the first word in order to be 64-aligned on 32-bit Name string lvs lv.LabelValues - bits uint64 } // NewCounter returns a new, usable Counter. @@ -81,9 +81,9 @@ func (c *Counter) LabelValues() []string { // Gauge is an in-memory implementation of a Gauge. type Gauge struct { + bits uint64 // bits has to be the first word in order to be 64-aligned on 32-bit Name string lvs lv.LabelValues - bits uint64 } // NewGauge returns a new, usable Gauge.