Skip to content

Commit

Permalink
tpl/collections: Add Merge benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jan 13, 2025
1 parent 2501de7 commit 39f582f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tpl/collections/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ func TestMerge(t *testing.T) {
}
}

func BenchmarkMerge(b *testing.B) {
ns := newNs()

for i := 0; i < b.N; i++ {
ns.Merge(
map[string]any{"a": 42, "c": 3, "e": 11},
map[string]any{"a": 1, "b": 2},
map[string]any{"a": 9, "c": 4, "d": 7},
)
}
}

func TestMergeDataFormats(t *testing.T) {
c := qt.New(t)
ns := newNs()
Expand Down

0 comments on commit 39f582f

Please sign in to comment.