Skip to content

Commit

Permalink
stats: fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Feb 21, 2023
1 parent 76a513c commit dd3481c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/stats/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func convertMapToSlice(m map[string]uint64, max int) (s []countPair) {
}

slices.SortFunc(s, func(a, b countPair) (sortsBefore bool) {
return a.Count < b.Count
return a.Count > b.Count
})
if max > len(s) {
max = len(s)
Expand Down

0 comments on commit dd3481c

Please sign in to comment.