Commit 22407fc8 by bergquist

fix(metrics): 64bit aligns standardcounter

Due to a bug in golang the 64bit variable i
need to come first to be 64bit aligned.
https://golang.org/pkg/sync/atomic/#pkg-note-BUG

closes #5341
parent dba6fe8a
...@@ -29,9 +29,8 @@ func RegCounter(name string, tagStrings ...string) Counter { ...@@ -29,9 +29,8 @@ func RegCounter(name string, tagStrings ...string) Counter {
// StandardCounter is the standard implementation of a Counter and uses the // StandardCounter is the standard implementation of a Counter and uses the
// sync/atomic package to manage a single int64 value. // sync/atomic package to manage a single int64 value.
type StandardCounter struct { type StandardCounter struct {
count int64 //Due to a bug in golang the 64bit variable need to come first to be 64bit aligned. https://golang.org/pkg/sync/atomic/#pkg-note-BUG
*MetricMeta *MetricMeta
count int64
} }
// Clear sets the counter to zero. // Clear sets the counter to zero.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment