MCPcopy Create free account
hub / github.com/apache/thrift / getCounter

Method getCounter

contrib/fb303/cpp/FacebookBase.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104int64_t FacebookBase::getCounter(const std::string& key) {
105 int64_t rv = 0;
106 counters_.lock();
107 ReadWriteCounterMap::iterator it = counters_.find(key);
108 if (it != counters_.end()) {
109 it->second.lock();
110 rv = it->second.value;
111 it->second.unlock();
112 }
113 counters_.unlock();
114 return rv;
115}
116
117inline int64_t FacebookBase::aliveSince() {
118 return aliveSince_;

Callers 1

reportCheckpointMethod · 0.45

Calls 4

findMethod · 0.80
lockMethod · 0.45
endMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected