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

Function limit_in_bytes

src/linux/cgroups.cpp:2326–2336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2324
2325
2326Try<Bytes> limit_in_bytes(const string& hierarchy, const string& cgroup)
2327{
2328 Try<string> read = cgroups::read(
2329 hierarchy, cgroup, "memory.limit_in_bytes");
2330
2331 if (read.isError()) {
2332 return Error(read.error());
2333 }
2334
2335 return Bytes::parse(strings::trim(read.get()) + "B");
2336}
2337
2338
2339Try<Nothing> limit_in_bytes(

Callers 7

TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
__updateMethod · 0.85
isolateMethod · 0.85
updateMethod · 0.85
oomWaitedMethod · 0.85

Calls 10

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

Tested by 3

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68