Skip to content

Commit

Permalink
Change sort ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrakhman committed Nov 21, 2023
1 parent 4c87978 commit a4e4a4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commonspace/requestmanager/requeststat.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ func (r *requestStat) QueueStat() spaceQueueStat {
firstTotalSize := first.QueueSize + first.SyncSize
secondTotalSize := second.QueueSize + second.SyncSize
if firstTotalSize > secondTotalSize {
return 1
return -1
} else if firstTotalSize == secondTotalSize {
return 0
} else {
return -1
return 1
}
})
return spaceQueueStat{
Expand All @@ -122,11 +122,11 @@ func (r *requestStat) Aggregate(values []debugstat.StatValue) SummaryStat {
}
slices.SortFunc(stats, func(first, second spaceQueueStat) int {
if first.TotalSize > second.TotalSize {
return 1
return -1
} else if first.TotalSize == second.TotalSize {
return 0
} else {
return -1
return 1
}
})
return SummaryStat{
Expand Down

0 comments on commit a4e4a4d

Please sign in to comment.