Skip to content

Commit

Permalink
tpl/collections: Add BenchmarkSortMap
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jan 13, 2025
1 parent 39f582f commit a2a4166
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tpl/collections/sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,11 @@ func TestSort(t *testing.T) {
})
}
}

func BenchmarkSortMap(b *testing.B) {
ns := newNs()
m := map[string]int{"1": 10, "2": 20, "3": 30, "4": 40, "5": 50}
for i := 0; i < b.N; i++ {
ns.Sort(context.Background(), m)
}
}

0 comments on commit a2a4166

Please sign in to comment.