()
| 64 | } |
| 65 | |
| 66 | function systemInfoReport() { |
| 67 | const MB_SIZE = 1024 * 1024; |
| 68 | const info = systemInfo(); |
| 69 | |
| 70 | const self = process.memoryUsage(); |
| 71 | const sysInfo = |
| 72 | `MEM: ${toInt((info.totalmem - info.freemem) / MB_SIZE)}MB/${toInt( |
| 73 | info.totalmem / MB_SIZE |
| 74 | )}MB` + ` CPU: ${toInt(info.cpuUsage * 100)}%`; |
| 75 | const selfInfo = `Heap: ${toInt(self.heapUsed / MB_SIZE)}MB/${toInt(self.heapTotal / MB_SIZE)}MB`; |
| 76 | const selfInfo2 = `RSS: ${toInt(self.rss / MB_SIZE)}MB`; |
| 77 | const logTip = $t("TXT_CODE_app.sysinfo"); |
| 78 | loggerSysInfo.info([`[${logTip}]`, sysInfo, selfInfo, selfInfo2].join(" ")); |
| 79 | } |
| 80 | |
| 81 | setInterval(systemInfoReport, 1000 * 5); |
| 82 |
nothing calls this directly
no test coverage detected