From 3a0b27e7e89e65378354feb08346a7fec24aa422 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Wed, 22 Feb 2023 12:13:07 +0300 Subject: [PATCH] Pull request 1749: 5522-fix-stat-sorting Updates #5522. Squashed commit of the following: commit dd3481cccf09f78fd85904cb69b9031371996f54 Author: Ainar Garipov Date: Tue Feb 21 20:14:29 2023 +0300 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 5a5ada4f..bf6eaf08 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)