MCPcopy Create free account
hub / github.com/apache/trafficserver / increment

Method increment

plugins/experimental/block_errors/block_errors.cc:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 IPTable() = default;
106
107 uint32_t
108 increment(swoc::IPAddr const &ip)
109 {
110 std::unique_lock lock(_mutex);
111 auto item = _table.find(ip);
112 if (item == _table.end()) {
113 _table.insert(std::make_pair(ip, IPTableItem()));
114 return 1;
115 } else {
116 ++item->second._count;
117 uint32_t tmp_count = item->second._count;
118 return tmp_count;
119 }
120 }
121
122 uint32_t
123 getCount(swoc::IPAddr const &ip)

Callers 1

handle_close_hookFunction · 0.45

Calls 4

IPTableItemClass · 0.85
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected