Skip to content

Commit

Permalink
fix oom record sort
Browse files Browse the repository at this point in the history
  • Loading branch information
whitebear009 committed Jan 1, 2024
1 parent 6d7758e commit 832e1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/oom/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (r *PodOOMRecorder) cleanOOMRecords(oomRecords []OOMRecord) []OOMRecord {
return records[i].OOMAt.Before(records[j].OOMAt)
})

records = records[0:r.OOMRecordMaxNumber]
records = records[len(oomRecords)-r.OOMRecordMaxNumber : len(oomRecords)]
oomRecords = records
}

Expand Down

0 comments on commit 832e1bc

Please sign in to comment.