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

Method count

src/v1/resources.cpp:1569–1582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1567
1568
1569size_t Resources::count(const Resource& that) const
1570{
1571 foreach (
1572 const Resource_Unsafe& resource_,
1573 resourcesNoMutationWithoutExclusiveOwnership) {
1574 if (resource_->resource == that) {
1575 // Return 1 for non-shared resources because non-shared
1576 // Resource objects in Resources are unique.
1577 return resource_->isShared() ? CHECK_NOTNONE(resource_->sharedCount) : 1;
1578 }
1579 }
1580
1581 return 0;
1582}
1583
1584
1585void Resources::allocate(const string& role)

Callers 15

sendFrameworkMessageMethod · 0.45
authorizeMethod · 0.45
_downloadMethod · 0.45
fetchMethod · 0.45
foreachpairFunction · 0.45
watchMethod · 0.45
broadcastMethod · 0.45
TEST_FFunction · 0.45
foreachFunction · 0.45
TEST_PFunction · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by 15

TEST_FFunction · 0.36
foreachFunction · 0.36
TEST_PFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TEST_PFunction · 0.36
TEST_FFunction · 0.36
verifyCacheMetricsMethod · 0.36
TEST_FFunction · 0.36
foreachFunction · 0.36
TEST_FFunction · 0.36