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

Function readEntries

src/linux/cgroups.cpp:1953–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1951
1952
1953static Try<vector<Value>> readEntries(
1954 const string& hierarchy,
1955 const string& cgroup,
1956 const string& control)
1957{
1958 Try<string> read = cgroups::read(hierarchy, cgroup, control);
1959 if (read.isError()) {
1960 return Error("Failed to read from '" + control + "': " + read.error());
1961 }
1962
1963 vector<Value> entries;
1964
1965 foreach (const string& s, strings::tokenize(read.get(), "\n")) {
1966 Try<Value> value = Value::parse(s);
1967 if (value.isError()) {
1968 return Error("Failed to parse blkio value '" + s + "' from '" +
1969 control + "': " + value.error());
1970 }
1971
1972 entries.push_back(value.get());
1973 }
1974
1975 return entries;
1976}
1977
1978
1979namespace cfq {

Callers 15

timeFunction · 0.85
time_recursiveFunction · 0.85
sectorsFunction · 0.85
sectors_recursiveFunction · 0.85
io_mergedFunction · 0.85
io_merged_recursiveFunction · 0.85
io_queuedFunction · 0.85
io_queued_recursiveFunction · 0.85
io_service_bytesFunction · 0.85
io_service_timeFunction · 0.85

Calls 6

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

Tested by

no test coverage detected