It's a JSP one of our developers put together. Here's the relevant bit.
for (Enumeration e = session.getAttributeNames(); e.hasMoreElements();)
{
String key = (String)e.nextElement();
Object obj = session.getAttribute(key);
String outputStr = null;
try
{
ByteArrayOutputStream byteOutput = new
ByteArrayOutputStream();
ObjectOutputStream output = new
ObjectOutputStream(byteOutput);
output.writeObject(obj);
int size = byteOutput.size();
totalSize += size;
outputStr = format.format(size) + " bytes";
}
catch (NotSerializableException ex)
{
StringWriter sb = new StringWriter();
sb.write("<PRE>");
ex.printStackTrace(new PrintWriter(sb));
sb.write("</PRE>");
outputStr = sb.toString();
}
}
On 6/8/07, Peter Thomas <[EMAIL PROTECTED]> wrote:
> Scott - what is the trick for getting a report of sizes of page maps like
> this? I was so far only aware that setting log level DEBUG on say
> org.apache.wicket.protocol.http.FilePageStore can give you
> some of this info...
>
> Thanks,
>
> Peter.
>
>
> On 6/8/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > Depends on your page, number of components, deployment mode, wicket
> > version, how you bind the models to your components.
> >
> > Do you use the second level cache for storing your pages for back
> > button support?
> >
> > Martijn
> >
> > On 6/8/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> > > Are these typical sizes for page maps?
> > >
> > > wicket:/app:p:null:2 67,668 bytes
> > > wicket:/app:p:null:1 55,861 bytes
> > > wicket:/app:p:null:0 52,817 bytes
> > >
> > > --
> > > Scott Swank
> > > reformed mathematician
> > >
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--
Scott Swank
reformed mathematician
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user