| 573 | } |
| 574 | |
| 575 | comm::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 | |
| 589 | Mode SchedulerMgr::GetMode(const int topic_id, TopicData &topic_data, const uint64_t now) { |
| 590 | Mode mode{Mode::Dynamic}; |
nothing calls this directly
no test coverage detected