MCPcopy Create free account
hub / github.com/apache/brpc / BatchAdd

Method BatchAdd

src/brpc/policy/weighted_randomized_load_balancer.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84size_t WeightedRandomizedLoadBalancer::BatchAdd(
85 Servers& bg, const std::vector<ServerId>& servers) {
86 size_t count = 0;
87 for (size_t i = 0; i < servers.size(); ++i) {
88 count += !!Add(bg, servers[i]);
89 }
90 return count;
91}
92
93size_t WeightedRandomizedLoadBalancer::BatchRemove(
94 Servers& bg, const std::vector<ServerId>& servers) {

Callers

nothing calls this directly

Calls 2

AddClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected