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

Method ClearAllConsumeStat

phxqueue/consumer/freqman.cpp:166–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void FreqMan::ClearAllConsumeStat() {
167 comm::RetCode ret;
168 auto &&opt(impl_->consumer->GetConsumerOption());
169
170 int nr_procs{opt->nprocs};
171
172 shared_ptr<const config::TopicConfig> topic_config;
173 if (comm::RetCode::RET_OK != (ret = config::GlobalConfig::GetThreadInstance()->GetTopicConfigByTopicID(impl_->topic_id, topic_config))) {
174 QLErr("GetTopicConfigByTopicID ret %d", as_integer(ret));
175 return;
176 }
177
178 for (int i{0}; i < nr_procs; ++i) {
179 ClearConsumeStat(impl_->shm->consume_stats[i], topic_config->GetProto().topic().handle_ids_size());
180 }
181}
182
183
184comm::RetCode FreqMan::UpdateLimitInfo() {

Callers

nothing calls this directly

Calls 3

as_integerFunction · 0.85
ClearConsumeStatFunction · 0.85

Tested by

no test coverage detected