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

Function memsw_usage_in_bytes

src/linux/cgroups.cpp:2439–2449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2437
2438
2439Try<Bytes> memsw_usage_in_bytes(const string& hierarchy, const string& cgroup)
2440{
2441 Try<string> read = cgroups::read(
2442 hierarchy, cgroup, "memory.memsw.usage_in_bytes");
2443
2444 if (read.isError()) {
2445 return Error(read.error());
2446 }
2447
2448 return Bytes::parse(strings::trim(read.get()) + "B");
2449}
2450
2451
2452Try<Bytes> max_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