MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getMean

Function getMean

src/keydb-diagnostic-tool.cpp:831–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831double getMean(std::deque<double> *q) {
832 double sum = 0;
833 for (long unsigned int i = 0; i < q->size(); i++) {
834 sum += (*q)[i];
835 }
836 return sum / q->size();
837}
838
839bool isAtFullLoad(double cpuPercent, unsigned int threads) {
840 return cpuPercent / threads >= 96;

Callers 1

mainFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected