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

Function createSlaveInfo

src/tests/master_benchmarks.cpp:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81namespace tests {
82
83static SlaveInfo createSlaveInfo(const SlaveID& slaveId)
84{
85 // Using a static local variable to avoid the cost of re-parsing.
86 static const Resources resources =
87 Resources::parse("cpus:20;mem:10240").get();
88
89 SlaveInfo slaveInfo;
90 *(slaveInfo.mutable_resources()) = resources;
91 *(slaveInfo.mutable_id()) = slaveId;
92 *(slaveInfo.mutable_hostname()) = slaveId.value(); // Simulate the hostname.
93
94 return slaveInfo;
95}
96
97
98static FrameworkInfo createFrameworkInfo(const FrameworkID& frameworkId)

Callers 5

createSlaveInfoMethod · 0.70
TEST_FFunction · 0.70
TEST_PFunction · 0.70
initializeMethod · 0.70

Calls 3

parseFunction · 0.50
getMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected