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

Function check_accounting

src/iocore/cache/RamCacheCLFUS.cc:226–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225#ifdef CHECK_ACOUNTING
226static void
227check_accounting(RamCacheCLFUS *c)
228{
229 int64_t x = 0, xsize = 0, h = 0;
230 RamCacheCLFUSEntry *y = c->lru[0].head;
231 while (y) {
232 x++;
233 xsize += y->size + ENTRY_OVERHEAD;
234 y = y->lru_link.next;
235 }
236 y = c->lru[1].head;
237 while (y) {
238 h++;
239 y = y->lru_link.next;
240 }
241 ink_assert(x == c->objects);
242 ink_assert(xsize == c->bytes);
243 ink_assert(h == c->history);
244}
245#else
246#define check_accounting(_c)
247#endif

Callers 3

getMethod · 0.85
compress_entriesMethod · 0.85
putMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected