sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

RubyProf.measure_mode=

call-seq:
measure_mode=value -> void

Specifies what ruby-prof should measure.  Valid values include:

*RubyProf::PROCESS_TIME - Measure process time.  This is default.  It is implemented using the clock functions in the C Runtime library.
*RubyProf::WALL_TIME - Measure wall time using gettimeofday on Linx and GetLocalTime on Windows
*RubyProf::CPU_TIME - Measure time using the CPU clock counter.  This mode is only supported on Pentium or PowerPC platforms.
*RubyProf::ALLOCATIONS - Measure object allocations.  This requires a patched Ruby interpreter.
*RubyProf::MEMORY - Measure memory size.  This requires a patched Ruby interpreter.
*RubyProf::GC_RUNS - Measure number of garbage collections.  This requires a patched Ruby interpreter.
*RubyProf::GC_TIME - Measure time spent doing garbage collection.  This requires a patched Ruby interpreter.*/

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/ruby-prof-0.15.8/lib/ruby-prof/compatibility.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RubyProf-measure_mode--for-pr


# Commit to git

git add app/server/ruby/vendor/ruby-prof-0.15.8/lib/ruby-prof/compatibility.rbgit commit -m "better docs for RubyProf.measure_mode="


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RubyProf-measure_mode--for-pr

hub pull-request


# Celebrate!