MCPcopy
hub / github.com/CapSoftware/Cap / readProcesses

Function readProcesses

apps/desktop/scripts/desktop-memory-soak.js:225–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223}
224
225function readProcesses() {
226 const output = execFileSync(
227 "ps",
228 ["-axo", "pid=,rss=,vsz=,etime=,command="],
229 { encoding: "utf8" },
230 );
231
232 return parsePsOutput(output);
233}
234
235function sampleCount(durationSeconds, intervalSeconds) {
236 return Math.max(1, Math.ceil(durationSeconds / intervalSeconds));

Callers 4

collectPhaseFunction · 0.85
listOtherCapProcessesFunction · 0.85
waitForAppFunction · 0.85
mainFunction · 0.85

Calls 1

parsePsOutputFunction · 0.90

Tested by

no test coverage detected