Rename SyncMaptoMap -> SyncMapToMap

Signed-off-by: Shivanth <shivanth.metchem@deliveryhero.com>
This commit is contained in:
Shivanth 2024-11-03 20:52:18 +01:00
parent aaa4dd1449
commit 782f32e1e7
1 changed files with 3 additions and 3 deletions

View File

@ -1456,7 +1456,7 @@ func compareNativeExemplarValues(t *testing.T, exps []*dto.Exemplar, values []fl
}
}
func syncMaptoMap(syncmap *sync.Map) (m map[int]int64) {
func syncMapToMap(syncmap *sync.Map) (m map[int]int64) {
m = map[int]int64{}
syncmap.Range(func(key, value any) bool {
m[key.(int)] = *value.(*int64)
@ -1974,8 +1974,8 @@ func TestConstNativeHistogram(t *testing.T) {
consthist, err := NewConstNativeHistogram(_his.Desc(),
cold.count,
math.Float64frombits(cold.sumBits),
syncMaptoMap(&cold.nativeHistogramBucketsPositive),
syncMaptoMap(&cold.nativeHistogramBucketsNegative),
syncMapToMap(&cold.nativeHistogramBucketsPositive),
syncMapToMap(&cold.nativeHistogramBucketsNegative),
cold.nativeHistogramZeroBucket,
cold.nativeHistogramSchema,
math.Float64frombits(cold.nativeHistogramZeroThresholdBits),