Re: Best way to monitor app memory usage...
Re: Best way to monitor app memory usage...
- Subject: Re: Best way to monitor app memory usage...
- From: Nathan Walker <email@hidden>
- Date: Thu, 21 Jul 2005 15:50:37 -0400
interesting, i'll give this a try... thanks..
On Jul 21, 2005, at 3:45 PM, Helge Städtler wrote:
you could attach a professional debugger...
...or just add these lines in one of the appendToResponse-methods
(e.g. in
your component, session, ...)
System.out.println( "MEMORY-STATUS\n" );
Runtime rt = Runtime.getRuntime();
System.out.println( "BEFORE rt.gc()" );
long free = rt.freeMemory();
long total = rt.totalMemory();
long percent = (100*free)/total;
System.out.println( "freemem: "+free+" totalmem: "+total+" (
"+percent+" % free)" );
rt.gc(); // free up some memory
System.out.println( "AFTER rt.gc()" );
free = rt.freeMemory();
total = rt.totalMemory();
percent = (100*free)/total;
System.out.println( "freemem: "+free+" totalmem: "+total+" (
"+percent+" % free)\n" );
regards,
helge
Am 21.07.2005 19:45 Uhr schrieb "Nathan Walker" unter
<email@hidden> / On 21.07.2005 19:45 Uhr "Nathan Walker"
wrote
using address <email@hidden>:
While developing an application, what's the best way to monitor how
much memory the application is consuming?
Thanks,
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40visionworxpro.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden