Skip to content

Commit

Permalink
fix: avoid events in dashboard UI for line
Browse files Browse the repository at this point in the history
there's just too many events when running a large number of workers
  • Loading branch information
starpit committed Apr 4, 2023
1 parent 22433e6 commit 184074c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class Live {

// inform the UI that we have updates
cb({
lines: this.pushLine(data, metric, timestamp),
// lines: this.pushLine(data, metric, timestamp),
workers: Object.values(this.workers),
})
}
Expand Down Expand Up @@ -166,7 +166,7 @@ export default class Live {

/** `pushLine` and then pass the updated model to `cb` */
private pushLineAndPublish(line: string, metric: WorkerState, timestamp: number, cb: OnData) {
cb({ lines: this.pushLine(line, metric, timestamp), workers: Object.values(this.workers) })
cb({ /* lines: this.pushLine(line, metric, timestamp), */ workers: Object.values(this.workers) })
}

private asMillisSinceEpoch(timestamp: string) {
Expand Down

0 comments on commit 184074c

Please sign in to comment.