diff --git a/internal/attribute/attribute_test.go b/internal/attribute/attribute_test.go index 113b644c80e..e2c35d9706e 100644 --- a/internal/attribute/attribute_test.go +++ b/internal/attribute/attribute_test.go @@ -133,3 +133,13 @@ func BenchmarkStringSliceValue(b *testing.B) { sync = StringSliceValue(s) } } + +func BenchmarkAsFloat64Slice(b *testing.B) { + b.ReportAllocs() + var in interface{} = [2]float64{1, 2.3} + b.ResetTimer() + + for i := 0; i < b.N; i++ { + sync = AsFloat64Slice(in) + } +}