MCPcopy Create free account
hub / github.com/ceph/ceph / take

Method take

src/common/Throttle.cc:138–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138int64_t Throttle::take(int64_t c)
139{
140 if (0 == max) {
141 return 0;
142 }
143 ceph_assert(c >= 0);
144 ldout(cct, 10) << "take " << c << dendl;
145 count += c;
146 if (logger) {
147 logger->inc(l_throttle_take);
148 logger->inc(l_throttle_take_sum, c);
149 logger->set(l_throttle_val, count);
150 }
151 return count;
152}
153
154bool Throttle::get(int64_t c, int64_t m)
155{

Callers 6

_take_op_budgetMethod · 0.45
TEST_FFunction · 0.45
set_payloadMethod · 0.45
set_middleMethod · 0.45
set_dataMethod · 0.45
encodeMethod · 0.45

Calls 2

incMethod · 0.45
setMethod · 0.45

Tested by 1

TEST_FFunction · 0.36