module GC::Profiler

The GC profiler provides access to information on GC runs including time, length and object space size.

Example:

GC::Profiler.enable

require 'rdoc/rdoc'

GC::Profiler.report

pp GC::Profiler.raw_data

GC::Profiler.disable

GC::Profiler.raw_data returns one Hash per GC run, including CPU time fields such as :GC_TIME and wall-clock fields such as :GC_WALL_TIME, :GC_PAUSE_TIME, :GC_STOP_TIME, and :GC_STW_TIME. :GC_WALL_TIME is the wall-clock counterpart to :GC_TIME, while :GC_PAUSE_TIME measures how long user execution was blocked by the GC entry.

See also GC.count, GC.malloc_allocated_size and GC.malloc_allocations