This commit is contained in:
boufni95 2025-02-25 20:15:44 +00:00
parent 8e16055183
commit 8f6f5bf209

View file

@ -40,11 +40,11 @@ export class StateBundler {
this.tlvStorage.initMeta() this.tlvStorage.initMeta()
this.interval = setInterval(() => { this.interval = setInterval(() => {
const mem = process.memoryUsage() const mem = process.memoryUsage()
this.AddValue('_root', 'memory_rss', mem.rss || 0, true) this.AddValue('_root', 'memory_rss_kb', Math.ceil(mem.rss / 1000 || 0), true)
this.AddValue('_root', 'memory_buffer', mem.arrayBuffers || 0, true) this.AddValue('_root', 'memory_buffer_kb', Math.ceil(mem.arrayBuffers / 1000 || 0), true)
this.AddValue('_root', 'memory_heap_total', mem.heapTotal || 0, true) this.AddValue('_root', 'memory_heap_total_kb', Math.ceil(mem.heapTotal / 1000 || 0), true)
this.AddValue('_root', 'memory_heap_used', mem.heapUsed || 0, true) this.AddValue('_root', 'memory_heap_used_kb', Math.ceil(mem.heapUsed / 1000 || 0), true)
this.AddValue('_root', 'memory_external', mem.external || 0, true) this.AddValue('_root', 'memory_external_kb', Math.ceil(mem.external / 1000 || 0), true)
}, 60 * 1000) }, 60 * 1000)
} }