Class: RubyProf::CallInfo
- Inherits:
-
Object
- Object
- RubyProf::CallInfo
- Defined in:
- ext/ruby_prof.c,
ext/ruby_prof.c
Overview
RubyProf::CallInfo is a helper class used by RubyProf::MethodInfo to keep track of which child methods were called and how long they took to execute.
Instance Method Summary collapse
-
#called ⇒ Integer
Returns the total amount of time this method was called.
-
#children_time ⇒ Float
Returns the total amount of time spent in this method’s children.
-
#self_time ⇒ Float
Returns the total amount of time spent in this method.
-
#total_time ⇒ Float
Returns the total amount of time spent in this method and its children.
Instance Method Details
#called ⇒ Integer
Returns the total amount of time this method was called.
533 534 535 536 537 538 539 |
# File 'ext/ruby_prof.c', line 533 static VALUE call_info_called(VALUE self) { prof_call_info_t *result = get_call_info_result(self); return INT2NUM(result->called); } |
#children_time ⇒ Float
Returns the total amount of time spent in this method’s children.
569 570 571 572 573 574 575 |
# File 'ext/ruby_prof.c', line 569 static VALUE call_info_children_time(VALUE self) { prof_call_info_t *result = get_call_info_result(self); prof_clock_t children_time = result->total_time - result->self_time; return rb_float_new(clock2sec(children_time)); } |
#self_time ⇒ Float
Returns the total amount of time spent in this method.
557 558 559 560 561 562 563 |
# File 'ext/ruby_prof.c', line 557 static VALUE call_info_self_time(VALUE self) { prof_call_info_t *result = get_call_info_result(self); return rb_float_new(clock2sec(result->self_time)); } |
#total_time ⇒ Float
Returns the total amount of time spent in this method and its children.
545 546 547 548 549 550 551 |
# File 'ext/ruby_prof.c', line 545 static VALUE call_info_total_time(VALUE self) { prof_call_info_t *result = get_call_info_result(self); return rb_float_new(clock2sec(result->total_time)); } |