Commit 6c03c64c by Carl Bergquist Committed by GitHub

Merge pull request #6768 from fg2it/fix6749

fix 6749 by swapping member in StandardGauge to avoid problem with atomic
parents ae171357 834e3f1c
...@@ -61,9 +61,10 @@ func (NilGauge) Value() int64 { return 0 } ...@@ -61,9 +61,10 @@ func (NilGauge) Value() int64 { return 0 }
// StandardGauge is the standard implementation of a Gauge and uses the // StandardGauge is the standard implementation of a Gauge and uses the
// sync/atomic package to manage a single int64 value. // sync/atomic package to manage a single int64 value.
// atomic needs 64-bit aligned memory which is ensure for first word
type StandardGauge struct { type StandardGauge struct {
*MetricMeta
value int64 value int64
*MetricMeta
} }
// Snapshot returns a read-only copy of the gauge. // Snapshot returns a read-only copy of the gauge.
......
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