1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Files
opentelemetry-go/sdk/metric/internal/exemplar/hist_test.go
T
Tyler Yahn e7de5715ab Add the Histogram Reservoir impl (#4870)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2024-01-30 07:46:21 -08:00

29 lines
954 B
Go

// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package exemplar
import "testing"
func TestHist(t *testing.T) {
bounds := []float64{0, 100}
t.Run("Int64", ReservoirTest[int64](func(int) (Reservoir[int64], int) {
return Histogram[int64](bounds), len(bounds)
}))
t.Run("Float64", ReservoirTest[float64](func(int) (Reservoir[float64], int) {
return Histogram[float64](bounds), len(bounds)
}))
}