Class: RubyProf::Result

Inherits:
Object
  • Object
show all
Defined in:
ext/ruby_prof.c,
ext/ruby_prof.c

Overview

The RubyProf::Result class is used to store the results of a profiling run. And instace of the class is returned from the methods RubyProf#stop and RubyProf#profile.

RubyProf::Result has one field, called threads, which is a hash table keyed on thread ID. For each thread id, the hash table stores another hash table that contains profiling information for each method called during the threads execution. That hash table is keyed on method name and contains RubyProf::MethodInfo objects.

Instance Method Summary collapse

Instance Method Details

#threadsHash

Returns a hash table keyed on thread ID. For each thread id, the hash table stores another hash table that contains profiling information for each method called during the threads execution. That hash table is keyed on method name and contains RubyProf::MethodInfo objects.

Returns:

  • (Hash)


1298
1299
1300
1301
1302
1303
# File 'ext/ruby_prof.c', line 1298

static VALUE
prof_result_threads(VALUE self)
{
    prof_result_t *prof_result = get_prof_result(self);
    return prof_result->threads;
}