mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-13 06:34:54 -04:00
tpl/collections: Add Merge benchmark
This commit is contained in:
parent
2501de7aab
commit
39f582f9f4
@ -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) {
|
func TestMergeDataFormats(t *testing.T) {
|
||||||
c := qt.New(t)
|
c := qt.New(t)
|
||||||
ns := newNs()
|
ns := newNs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user