@nosana/node 1.1.10 → 1.1.11-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.10",
3
+ "version": "1.1.11-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -1,5 +1,6 @@
1
1
  import { TaskStat } from '../TaskManager.js';
2
2
  export declare class StatsBuffer {
3
+ private readonly capacity;
3
4
  private readonly buffer;
4
5
  push(stat: TaskStat): void;
5
6
  get length(): number;
@@ -1,8 +1,12 @@
1
1
  export class StatsBuffer {
2
2
  constructor() {
3
- this.buffer = new Array((24 * 60 * 60) / 5); // 24 hours of stats at 5s intervals
3
+ this.capacity = (24 * 60 * 60) / 5; // 24 hours of stats at 5s intervals
4
+ this.buffer = [];
4
5
  }
5
6
  push(stat) {
7
+ if (this.buffer.length >= this.capacity) {
8
+ this.buffer.shift();
9
+ }
6
10
  this.buffer.push(stat);
7
11
  }
8
12
  get length() {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.10",
3
+ "version": "1.1.11-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.10",
9
+ "version": "1.1.11-rc",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@coral-xyz/anchor": "^0.28.1-beta.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.10",
3
+ "version": "1.1.11-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"