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

Method find

src/common/resources.cpp:1829–1846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1827
1828
1829Option<Resources> Resources::find(const Resources& targets) const
1830{
1831 Resources total;
1832
1833 // TODO(mzhu): Traverse `Resource_` to preserve `sharedCount`.
1834 foreach (const Resource& target, targets) {
1835 Option<Resources> found = find(target);
1836
1837 // Each target needs to be found!
1838 if (found.isNone()) {
1839 return None();
1840 }
1841
1842 total += found.get();
1843 }
1844
1845 return total;
1846}
1847
1848
1849Try<Resources> Resources::apply(const ResourceConversion& conversion) const

Callers 7

mainFunction · 0.45
foreachMethod · 0.45
foreachFunction · 0.45
parseFunction · 0.45
foreachFunction · 0.45
lowerSlaveToAgentFunction · 0.45
upperSlaveToAgentFunction · 0.45

Calls 4

NoneClass · 0.85
ResourcesClass · 0.70
bindFunction · 0.50
toUnreservedMethod · 0.45

Tested by

no test coverage detected