1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/attribute
Tyler Yahn deddec38ac
Optimize (attribute.Set).Filter for no filtered case (#4774)
* Optimize Set.Filter for no filtered case

When all elements of the Set are kept during a call to Filter, do not
allocate a new Set and the dropped attributes slice. Instead, return the
immutable Set and nil.

To achieve this the functionality of filterSet is broken down into a
more generic filteredToFront function.

* Apply suggestions from code review

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* Rename run to benchFn based on review feedback

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-01-08 07:49:45 -08:00
..
benchmark_test.go Remove deprecated Array from attribute package (#2235) 2021-09-10 11:51:02 -04:00
doc.go Prerelease v1.0.0 (#2250) 2021-09-20 13:02:46 -07:00
encoder.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
filter_test.go Switch Stream back to having an AttributeFilter field and add New*Filter functions (#4444) 2023-08-25 07:39:43 -07:00
filter.go Switch Stream back to having an AttributeFilter field and add New*Filter functions (#4444) 2023-08-25 07:39:43 -07:00
iterator_test.go Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
iterator.go Replace use of old term label with attribute (#2790) 2022-04-18 07:31:31 -07:00
key_test.go Use gofumpt instead of gofmt (#4623) 2023-10-16 10:02:21 -07:00
key.go Remove deprecated Array from attribute package (#2235) 2021-09-10 11:51:02 -04:00
kv_test.go Make the AsType functions not panic (#3489) 2022-11-25 15:27:47 -08:00
kv.go refactor: use Key's Defined method (#2593) 2022-02-10 19:41:34 -05:00
set_test.go Optimize (attribute.Set).Filter for no filtered case (#4774) 2024-01-08 07:49:45 -08:00
set.go Optimize (attribute.Set).Filter for no filtered case (#4774) 2024-01-08 07:49:45 -08:00
type_string.go Bump github.com/jcchavezs/porto from 0.2.1 to 0.3.0 in /internal/tools (#2288) 2021-10-15 11:36:56 -07:00
value_test.go attribute: fix slice related function bug (#3252) 2022-10-13 09:34:02 -05:00
value.go Refactor package internal/attribute to not use generics. (#3725) 2023-02-15 10:37:07 -08:00