Implement logger and bar options

This commit is contained in:
2023-11-27 11:30:49 +01:00
parent 74a4204046
commit a0b4e51695
5 changed files with 84 additions and 54 deletions

View File

@@ -5,6 +5,7 @@ class Metric {
this.multibar = multibar;
this.bar = multibar.create(0, 0);
this.bar.update(0, { name: barName });
this.bar.total = 1000;
this.buffer = new CircularBuffer(bufferSize);
this.maxRate = 0;
if (refresh) {
@@ -29,10 +30,10 @@ class Metric {
UpdateBar() {
const eps = this.GetRate();
if (eps > this.maxRate) {
this.bar.total = eps;
this.maxRate = eps;
}
// if (eps > this.maxRate) {
// this.bar.total = eps;
// this.maxRate = eps;
// }
this.bar.update(eps);
}
}