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

Method interval

3rdparty/libprocess/src/reap.cpp:131–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130
131const Duration ReaperProcess::interval()
132{
133 size_t count = promises.size();
134
135 if (count <= LOW_PID_COUNT) {
136 return MIN_REAP_INTERVAL();
137 } else if (count >= HIGH_PID_COUNT) {
138 return MAX_REAP_INTERVAL();
139 }
140
141 // Linear interpolation between min and max reap intervals.
142 double fraction =
143 ((double) (count - LOW_PID_COUNT) / (HIGH_PID_COUNT - LOW_PID_COUNT));
144
145 return (MIN_REAP_INTERVAL() +
146 (MAX_REAP_INTERVAL() - MIN_REAP_INTERVAL()) * fraction);
147}
148
149} // namespace internal {
150

Callers

nothing calls this directly

Calls 3

MIN_REAP_INTERVALFunction · 0.85
MAX_REAP_INTERVALFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected