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

Method AddTask

phxqueue/producer/batchhelper.cpp:121–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120
121void BatchTask::AddTask(shared_ptr<Task> task) {
122 auto req = task->GetReq();
123 if (nullptr == req) return;
124 if (0 == start_timestamp_ms_) start_timestamp_ms_ = comm::utils::Time::GetSteadyClockMS();
125
126 nbyte_ += req->ByteSize();
127 nitems_ += req->items_size();
128
129 tasks_.push_back(task);
130}
131
132bool BatchTask::Ready(uint64_t *ready_timestamp_ms) {
133 if (ready_timestamp_ms) *ready_timestamp_ms = 0;

Callers 1

BatchRawAddMethod · 0.80

Calls 1

GetReqMethod · 0.80

Tested by

no test coverage detected