mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
tpl/collections: Add Merge benchmark
This commit is contained in:
@@ -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()
|
||||||
|
Reference in New Issue
Block a user