Skip to content

Commit a2a4166

Browse files
committed
tpl/collections: Add BenchmarkSortMap
1 parent 39f582f commit a2a4166

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tpl/collections/sort_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,11 @@ func TestSort(t *testing.T) {
261261
})
262262
}
263263
}
264+
265+
func BenchmarkSortMap(b *testing.B) {
266+
ns := newNs()
267+
m := map[string]int{"1": 10, "2": 20, "3": 30, "4": 40, "5": 50}
268+
for i := 0; i < b.N; i++ {
269+
ns.Sort(context.Background(), m)
270+
}
271+
}

0 commit comments

Comments
 (0)