[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

know can I know how much object has been created???

sayoyo Sayoyo

3/31/2006 7:05:00 PM

Hi,

We have an application which is very time and ressource consuming, so
we would like to know how to monitoring the number of object created
and the size of memory used by ruby? is there any API that we can use
or where can I find the documentation about this???

Thanks you very much

sayoyo

2 Answers

Gene Tani

3/31/2006 7:25:00 PM

0


sayoyo@yahoo.com wrote:
> Hi,
>
> We have an application which is very time and ressource consuming, so
> we would like to know how to monitoring the number of object created
> and the size of memory used by ruby? is there any API that we can use
> or where can I find the documentation about this???
>

Not much info to go on, but assuming you've ascertained it's not bound
by network latencies, or web or database server latencies:

Object counts: something like:
c=Hash.new(0); ObjectSpace.each_object {|obj| c[obj.class]+=1}; pp
c.sort_by {|k,v| -v}

http://www.rubygarden.org/ruby?N...
----------
background info on Memory/ GC:

http://del.icio.us/t...

http://whytheluckystiff.net/articles/theFullyUpturn...

http://www.rubygarden.org/ruby?GCAndMemory...

sayoyo Sayoyo

3/31/2006 8:10:00 PM

0

Thanks you very much for the information:)!!!!

Sayoyo