diff --git a/broker/metrics.go b/broker/metrics.go index b40a898..d9e0820 100644 --- a/broker/metrics.go +++ b/broker/metrics.go @@ -35,9 +35,9 @@ func (r records) Len() int { return len(r) } func (r records) Swap(i, j int) { r[i], r[j] = r[j], r[i] } func (r records) Less(i, j int) bool { if r[i].count == r[j].count { - return r[i].cc > r[j].cc + return r[i].cc < r[j].cc } - return r[i].count < r[j].count + return r[i].count > r[j].count } type Metrics struct { @@ -197,7 +197,7 @@ func displayCountryStats(m *sync.Map, binned bool) string { } return true }) - sort.Sort(sort.Reverse(rs)) + sort.Sort(rs) for _, r := range rs { count := uint64(r.count) if binned {