mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03:00
tpl/collections: Add Merge benchmark
This commit is contained in:
parent
2501de7aab
commit
39f582f9f4
1 changed files with 12 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue