Skip to content

Commit

Permalink
Rename SyncMaptoMap -> SyncMapToMap
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanthzen committed Nov 3, 2024
1 parent c4ea7a5 commit 356875e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prometheus/histogram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 356875e

Please sign in to comment.