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

Method Update

phxqueue/scheduler/schedulermgr.h:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 virtual ~MeanVector() = default;
60
61 void Update(const int value) {
62 std::lock_guard<std::mutex> guard(mutex_);
63
64 const uint32_t size{vector_.size()};
65 if (0 >= size)
66 return;
67
68 vector_[cursor_ % size] = value;
69 ++cursor_;
70 }
71
72 float Mean() {
73 std::lock_guard<std::mutex> guard(mutex_);

Callers 1

GetAddrScaleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected