mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
swap member declaration in StandardGauge to avoid problem with atomic on arm and x86-32
This commit is contained in:
@@ -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.
|
||||||
|
Reference in New Issue
Block a user