MCPcopy
hub / github.com/learnhouse/learnhouse / dockerStats

Function dockerStats

apps/cli/src/services/docker.ts:233–238  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

231}
232
233export function dockerStats(cwd: string): string {
234 return execSync(
235 'docker compose stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}"',
236 { cwd, stdio: 'pipe' },
237 ).toString()
238}
239
240export function dockerStatsForContainers(containerNames: string[]): string {
241 if (containerNames.length === 0) return ''

Callers 4

healthCommandFunction · 0.85
scaleResourcesFunction · 0.85
scaleCommandFunction · 0.85
unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected