MCPcopy Create free account
hub / github.com/apache/mesos / usage_in_bytes

Function usage_in_bytes

src/linux/cgroups.cpp:2426–2436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2424
2425
2426Try<Bytes> usage_in_bytes(const string& hierarchy, const string& cgroup)
2427{
2428 Try<string> read = cgroups::read(
2429 hierarchy, cgroup, "memory.usage_in_bytes");
2430
2431 if (read.isError()) {
2432 return Error(read.error());
2433 }
2434
2435 return Bytes::parse(strings::trim(read.get()) + "B");
2436}
2437
2438
2439Try<Bytes> memsw_usage_in_bytes(const string& hierarchy, const string& cgroup)

Callers 1

usageMethod · 0.85

Calls 7

trimFunction · 0.85
readFunction · 0.70
parseFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected