The following are examples of running rb_objcpu.d. The rb_objnew.d script reports the on-CPU time for new Object creation in Ruby while the script is tracing. Here we see it running while Code/Ruby/func_abc.rb is executed. # rb_objcpu.d Tracing... Hit Ctrl-C to end. ^C Total object creation on-CPU time (ms): 0 Object creation on-CPU time distributions (us), NoMemoryError value ------------- Distribution ------------- count 0 | 0 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 2 | 0 SystemStackError value ------------- Distribution ------------- count 0 | 0 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 2 | 0 fatal value ------------- Distribution ------------- count 0 | 0 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 2 | 0 ThreadGroup value ------------- Distribution ------------- count 4 | 0 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 16 | 0 Object value ------------- Distribution ------------- count 0 | 0 1 |@@@@@@@@@@@@@ 1 2 |@@@@@@@@@@@@@ 1 4 | 0 8 |@@@@@@@@@@@@@ 1 16 | 0 We can see that there were several different types of Objects created including three of type 'Object', one of which took 1 microsecond, one of which took 2 to 3 microseconds, and the last of which took between 8 and 15 microseconds. |