From dd3481cccf09f78fd85904cb69b9031371996f54 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 21 Feb 2023 20:14:29 +0300 Subject: [PATCH] stats: fix sorting --- internal/stats/unit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/stats/unit.go b/internal/stats/unit.go index 5a5ada4f964..bf6eaf0833b 100644 --- a/internal/stats/unit.go +++ b/internal/stats/unit.go @@ -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)