MCPcopy Create free account
hub / github.com/Tencent/phxqueue / BuildTopicScaleString

Method BuildTopicScaleString

phxqueue/scheduler/schedulermgr.cpp:575–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575comm::RetCode SchedulerMgr::BuildTopicScaleString(const TopicData &topic_data, string &s) {
576 for (auto &&consumer_addr2info_kv : topic_data.consumer_addr2info_map) {
577 if (1000 < s.size()) {
578 s += "...";
579
580 return comm::RetCode::RET_OK;
581 }
582 s += comm::utils::EncodedAddrToIPString(consumer_addr2info_kv.first) + ":";
583 s += to_string(consumer_addr2info_kv.second.weight) + ";";
584 }
585
586 return comm::RetCode::RET_OK;
587}
588
589Mode SchedulerMgr::GetMode(const int topic_id, TopicData &topic_data, const uint64_t now) {
590 Mode mode{Mode::Dynamic};

Callers

nothing calls this directly

Calls 1

EncodedAddrToIPStringFunction · 0.85

Tested by

no test coverage detected