MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / formatMemory

Function formatMemory

src/cm/lsp/serverLauncher.ts:1226–1232  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

1224}
1225
1226function formatMemory(bytes: number): string {
1227 if (!bytes || bytes <= 0) return "—";
1228 const mb = bytes / (1024 * 1024);
1229 if (mb >= 1) return `${mb.toFixed(1)} MB`;
1230 const kb = bytes / 1024;
1231 return `${kb.toFixed(0)} KB`;
1232}
1233
1234function formatUptime(seconds: number): string {
1235 if (!seconds || seconds <= 0) return "—";

Callers 2

getServerStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected