(content: string)
| 47 | } |
| 48 | |
| 49 | export function parseMemoryMax(content: string): number | null { |
| 50 | const trimmed = content.trim(); |
| 51 | if (!trimmed) return null; |
| 52 | if (trimmed === 'max') return os.totalmem(); |
| 53 | const n = Number(trimmed); |
| 54 | if (!Number.isFinite(n) || n <= 0) return null; |
| 55 | return n; |
| 56 | } |
| 57 | |
| 58 | export interface MachineStatsSource { |
| 59 | read(): Promise<IResourceLoad>; |
no outgoing calls
no test coverage detected