fix: make eslint happy
📊 Benchmark the Runtime / benchmark (pull_request) Successful in 1m4s
🚀 Lint & Test & Deploy / quality (pull_request) Successful in 2m24s
🚀 Lint & Test & Deploy / test-unit (pull_request) Successful in 30s
🚀 Lint & Test & Deploy / test-e2e (pull_request) Failing after 32s
🚀 Lint & Test & Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
2026-05-04 15:19:18 +02:00
parent a6b9ca4315
commit db5ee8ba29
+6 -13
View File
@@ -22,22 +22,15 @@ export async function readCpuSnapshot(): Promise<CpuSnapshot> {
const stat = await readFile('/proc/stat', 'utf8'); const stat = await readFile('/proc/stat', 'utf8');
const line = stat.split('\n')[0]; const line = stat.split('\n')[0];
const parts = line const parts: number[] = line
.trim() .trim()
.split(/\s+/) .split(/\s+/)
.slice(1) .slice(1)
.map(v => Number(v)); .map((v: unknown) => Number(v));
const [ const idle = parts[3];
user, const iowait = parts[4];
nice, const steal = parts[7];
system,
idle,
iowait,
irq,
softirq,
steal
] = parts;
return { return {
idle: idle + iowait, idle: idle + iowait,
@@ -74,7 +67,7 @@ export async function readCgroupCpuStat() {
for (const path of possiblePaths) { for (const path of possiblePaths) {
try { try {
const txt = await readFile(path, 'utf8'); const txt: string = await readFile(path, 'utf8');
return Object.fromEntries( return Object.fromEntries(
txt txt