summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-29 14:34:19 -0300
committershennetsind <ind@henn.et>2013-03-29 14:34:19 -0300
commit646f97864d1ea02f8252d681f2cae6645a857a92 (patch)
tree1f2447bce49c8f5158a32257cedc530889c0d716 /src/common
parentbe07517740817dda32d5c0480cd81956f1682608 (diff)
downloadhercules-646f97864d1ea02f8252d681f2cae6645a857a92.tar.gz
hercules-646f97864d1ea02f8252d681f2cae6645a857a92.tar.bz2
hercules-646f97864d1ea02f8252d681f2cae6645a857a92.tar.xz
hercules-646f97864d1ea02f8252d681f2cae6645a857a92.zip
Re-implementing ERS report()
available through map-server console input, type ers_report to print data (useful for debug purposes) Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ers.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/common/ers.c b/src/common/ers.c
index b94b0888d..3b354166e 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -278,7 +278,16 @@ ERS ers_new(uint32 size, char *name, enum ERSOptions options)
void ers_report(void)
{
- // FIXME: Someone use this? Is it really needed?
+ ers_cache_t *cache;
+ int i = 0;
+ for (cache = CacheList; cache; cache = cache->Next) {
+ ShowMessage(CL_BOLD"[Entry manager #%u report]\n"CL_NORMAL, ++i);
+ ShowMessage("\tinstances : %u\n", cache->ReferenceCount);
+ ShowMessage("\tblock array size : %u\n", cache->ObjectSize);
+ ShowMessage("\tallocated blocks : %u\n", cache->Free+cache->Used);
+ ShowMessage("\tentries being used : %u\n", cache->Used);
+ ShowMessage("\tunused entries : %u\n", cache->Free);
+ }
}
void ers_force_destroy_all(void)