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

Discussion in 'Ruby' started by sayoyo@yahoo.com, Mar 31, 2006.

  1. Guest

    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
    , Mar 31, 2006
    #1
    1. Advertising

  2. Gene Tani Guest

    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?NewProfiler
    ----------
    background info on Memory/ GC:

    http://del.icio.us/tag/ruby gc

    http://whytheluckystiff.net/articles/theFullyUpturnedBin.html

    http://www.rubygarden.org/ruby?GCAndMemoryManagement
    Gene Tani, Mar 31, 2006
    #2
    1. Advertising

  3. Guest

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

    Sayoyo
    , Mar 31, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loga123
    Replies:
    2
    Views:
    318
    loga123
    May 20, 2006
  2. Bob
    Replies:
    3
    Views:
    1,397
  3. DaveB
    Replies:
    3
    Views:
    307
    DaveB
    Apr 11, 2010
  4. Raymond Schanks
    Replies:
    0
    Views:
    500
    Raymond Schanks
    Apr 11, 2010
  5. Ben Bullock
    Replies:
    24
    Views:
    408
    Randal L. Schwartz
    May 6, 2009
Loading...

Share This Page