ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-324) cache hits/misses
Date Tue, 18 Jul 2006 06:36:16 GMT
    [ http://issues.apache.org/jira/browse/IBATIS-324?page=comments#action_12421798 ] 
Clinton Begin commented on IBATIS-324:

>> can you do that please in a svn

I'll look into it.  I believe there's a decent way to do it without changing the normal public
interface.  I'll post it here.

>> memory size, even if inaccurate and only by declared xml name or entire cache size

Let me rephrase my answer:  There's NO way to do that in Java.  

According to one person:  you can estimate it. It's about 15 bytes in overhead per object.
You can count 4 bytes for a reference. The primitive sizes are defined in the language (4
for an int, 8 for a double, etcetera).

You'd have to write something that travelled the entire collection and the entire object graph
for each entry....that would not be fast if you're talking megabytes worth of data as your
original post would suggest.

You might be better off just estimating based on the available memory as reported by the Java


> cache hits/misses
> -----------------
>                 Key: IBATIS-324
>                 URL: http://issues.apache.org/jira/browse/IBATIS-324
>             Project: iBatis for Java
>          Issue Type: New Feature
>          Components: SQL Maps
>            Reporter: V.C.
>            Priority: Minor
> It be nice to be able in real time and loged report on cache hits/misses monitoring,
size of cache by map name in megs, and report by hour/date # of times a statment was used.
> (also log the slow sql statements, like anything that takes more then 1/3 of a seconds
to log the statment and arguments).
> these are standard managment issues that come up now and then.
> i'd consider implementing if that helps.
> .V

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message