Skip to content

Commit 39f582f

Browse files
committed
tpl/collections: Add Merge benchmark
1 parent 2501de7 commit 39f582f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tpl/collections/merge_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ func TestMerge(t *testing.T) {
159159
}
160160
}
161161

162+
func BenchmarkMerge(b *testing.B) {
163+
ns := newNs()
164+
165+
for i := 0; i < b.N; i++ {
166+
ns.Merge(
167+
map[string]any{"a": 42, "c": 3, "e": 11},
168+
map[string]any{"a": 1, "b": 2},
169+
map[string]any{"a": 9, "c": 4, "d": 7},
170+
)
171+
}
172+
}
173+
162174
func TestMergeDataFormats(t *testing.T) {
163175
c := qt.New(t)
164176
ns := newNs()

0 commit comments

Comments
 (0)