Try turning on verbose gc.

In particular, if you mark the start of a particular timing run by printing
a line to output and then collect the GC output between those marks, you can
determine total garbage collected.  A bit of averaging later and you have
the number you seek.  Mis-sizing the newspace could be done to get more
frequent collections and thus more resolution, but I doubt you need that.

There are more elaborate methods using JMX, but this should do.

http://java.sun.com/docs/hotspot/gc1.4.2/example.html

On 3/10/08 6:02 PM, "Jason Rennie" <[EMAIL PROTECTED]> wrote:

>> Were you able to measure garbage production?
>> 
> 
> How would I do that?
> 
> Jason

Reply via email to