| 876 | } |
| 877 | |
| 878 | int SchedulerMgr::NextConsumerWeight(const shared_ptr<const config::TopicConfig> &topic_config, |
| 879 | const int dynamic_load, const float mean_load, |
| 880 | const int init_weight) { |
| 881 | if (0 >= dynamic_load) |
| 882 | return 0; |
| 883 | |
| 884 | int new_weight{static_cast<int>(init_weight * mean_load / |
| 885 | static_cast<float>(dynamic_load))}; |
| 886 | if (init_weight * topic_config->GetProto().topic().scheduler_max_init_weight_percent() / 100 < new_weight) { |
| 887 | new_weight = init_weight * topic_config->GetProto().topic().scheduler_max_init_weight_percent() / 100; |
| 888 | } |
| 889 | |
| 890 | return new_weight; |
| 891 | } |
| 892 | |
| 893 | void SchedulerMgr::IsForceMaster(bool &force, bool &master) { |
| 894 | force = false; |
nothing calls this directly
no outgoing calls
no test coverage detected