|
So, as a reply to a comment in my last post, I explained why I'm writing a half-hacked sizeOf.
Basically, I have a running web application, which I can't have crash. It doesn't use sessions for anything. Many of the pages are very data intensive. I've written some new functionality for this application, which uses sessions to cache large database results. I put a few Objects into the HttpSession, and it works out really well.
On the minus side, I need to know how much space some of these objects are taking up in memory. I'm expecting some of them to be quite large; anywhere from 1 kb to well over 1 Mb. The objects are complex enough that I'd have a real difficult time manually estimating this, so I'm using the function I previously posted to estimate some things.
I know that this doesn't serialize transient or static objects, but I don't have transients, don't care about statics, and I'm not using BeanInfo. :) I'm using 1.4.2 and Tomcat 4.1; any way to actually profile this and take a look at live data? |