--------------------- PatchSet 2212 Date: 2001/05/04 17:09:30 Author: akroonmaa Branch: chunked_mempools Tag: (none) Log: add some curiosity satisfaction stats to memPool report Members: src/mem.c:1.9.8.8->1.9.8.9 Index: squid/src/mem.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mem.c,v retrieving revision 1.9.8.8 retrieving revision 1.9.8.9 diff -u -r1.9.8.8 -r1.9.8.9 --- squid/src/mem.c 4 May 2001 14:52:42 -0000 1.9.8.8 +++ squid/src/mem.c 4 May 2001 17:09:30 -0000 1.9.8.9 @@ -1,6 +1,6 @@ /* - * $Id: mem.c,v 1.9.8.8 2001/05/04 14:52:42 akroonmaa Exp $ + * $Id: mem.c,v 1.9.8.9 2001/05/04 17:09:30 akroonmaa Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -489,6 +489,7 @@ static char buf[64]; static MemPoolStats mp_stats; static MemPoolGlobalStats mp_total; + int not_used = 0; MemPoolIterator *iter; MemPool *pool; @@ -521,14 +522,16 @@ /* main table */ iter = memPoolIterate(); - while ((pool = memPoolIterateNext(iter))) { memPoolGetStats(&mp_stats, pool); if (!mp_stats.pool) /* pool destroyed */ continue; if (mp_stats.pool->meter.inuse.hwater_level > 0) /* this pool has been used */ memPoolReport(&mp_stats, mp_total.TheMeter, e); + else + not_used++; } + memPoolIterateDone(&iter); mp_stats.pool = NULL; mp_stats.label = "Total"; @@ -554,4 +557,8 @@ mp_total.tot_overhead, xpercent(mp_total.tot_overhead, mp_total.TheMeter->inuse.level)); /* limits */ storeAppendPrintf(e, "Idle pool limit: %.2f MB\n", toMB(mp_total.mem_idle_limit)); + /* limits */ + storeAppendPrintf(e, "Total Pools created: %d\n", mp_total.tot_pools_alloc); + storeAppendPrintf(e, "Pools ever used: %d (shown above)\n",mp_total.tot_pools_alloc - not_used); + storeAppendPrintf(e, "Currently in use: %d\n", mp_total.tot_pools_inuse); }