MCPcopy Create free account
hub / github.com/anus-dev/ANUS / updateMemory

Function updateMemory

packages/cli/src/ui/components/MemoryUsageDisplay.tsx:19–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18 useEffect(() => {
19 const updateMemory = () => {
20 const usage = process.memoryUsage().rss;
21 setMemoryUsage(formatMemoryUsage(usage));
22 setMemoryUsageColor(
23 usage >= 2 * 1024 * 1024 * 1024 ? Colors.AccentRed : Colors.Gray,
24 );
25 };
26 const intervalId = setInterval(updateMemory, 2000);
27 updateMemory(); // Initial update
28 return () => clearInterval(intervalId);

Callers 1

MemoryUsageDisplayFunction · 0.85

Calls 1

formatMemoryUsageFunction · 0.50

Tested by

no test coverage detected