Experimental CPU Optimize Techniques
CI / test (push) Successful in 1m1s
Release rolling / release (push) Successful in 7m25s

This commit is contained in:
Raven Scott
2026-07-21 11:58:29 -04:00
parent 58fcc52d6c
commit 1d902a89b0
8 changed files with 149 additions and 68 deletions
+3 -1
View File
@@ -58,9 +58,11 @@ export function isSelfMonitorEnabled() {
return true
}
const SELF_MONITOR_INTERVAL = Number(process.env.PEARDATA_SELF_MONITOR_MS) || 5000
export class SelfMonitorCollector extends CollectorPlugin {
constructor(opts = {}) {
super({ name: 'self-monitor', intervalMs: opts.intervalMs })
super({ name: 'self-monitor', intervalMs: opts.intervalMs || SELF_MONITOR_INTERVAL })
/** @type {{ user: number, system: number }|null} */
this._prevCpu = null
/** @type {number|null} */