Skip to content

Commit

Permalink
fix: lines output was showing least interesting events
Browse files Browse the repository at this point in the history
also show 6 not 18 lines
  • Loading branch information
starpit committed Apr 7, 2023
1 parent 64e2659 commit 6426e9d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export default class Live {
/** Model of the lines of output */
private readonly lines = new Heap<Line>((a, b) => {
if (a.line === b.line) {
return 0
return a.timestamp - b.timestamp
}

const stateDiff = a.stateRank - b.stateRank
const stateDiff = b.stateRank - a.stateRank
if (stateDiff !== 0) {
return stateDiff
} else {
Expand Down Expand Up @@ -160,7 +160,7 @@ export default class Live {

return this.lines
.toArray()
.slice(0, 18)
.slice(0, 6)
.sort((a, b) => a.timestamp - b.timestamp)
}

Expand Down

0 comments on commit 6426e9d

Please sign in to comment.