Class: Timeasure::Profiling::ReportedMethod
- Inherits:
-
Object
- Object
- Timeasure::Profiling::ReportedMethod
- Defined in:
- lib/timeasure/profiling/reported_method.rb
Instance Attribute Summary collapse
-
#call_count ⇒ Object
readonly
Returns the value of attribute call_count.
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#klass_name ⇒ Object
readonly
Returns the value of attribute klass_name.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#method_path ⇒ Object
readonly
Returns the value of attribute method_path.
-
#runtime_sum ⇒ Object
readonly
Returns the value of attribute runtime_sum.
-
#segment ⇒ Object
readonly
Returns the value of attribute segment.
Instance Method Summary collapse
- #increment_call_count ⇒ Object
- #increment_runtime_sum(runtime) ⇒ Object
-
#initialize(measurement) ⇒ ReportedMethod
constructor
A new instance of ReportedMethod.
Constructor Details
#initialize(measurement) ⇒ ReportedMethod
Returns a new instance of ReportedMethod.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/timeasure/profiling/reported_method.rb', line 6 def initialize(measurement) @klass_name = measurement.klass_name @method_name = measurement.method_name @segment = measurement.segment @metadata = measurement. @full_path = measurement.full_path @method_path = measurement.method_path @runtime_sum = 0 @call_count = 0 end |
Instance Attribute Details
#call_count ⇒ Object (readonly)
Returns the value of attribute call_count.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def call_count @call_count end |
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def full_path @full_path end |
#klass_name ⇒ Object (readonly)
Returns the value of attribute klass_name.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def klass_name @klass_name end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def @metadata end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def method_name @method_name end |
#method_path ⇒ Object (readonly)
Returns the value of attribute method_path.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def method_path @method_path end |
#runtime_sum ⇒ Object (readonly)
Returns the value of attribute runtime_sum.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def runtime_sum @runtime_sum end |
#segment ⇒ Object (readonly)
Returns the value of attribute segment.
4 5 6 |
# File 'lib/timeasure/profiling/reported_method.rb', line 4 def segment @segment end |
Instance Method Details
#increment_call_count ⇒ Object
22 23 24 |
# File 'lib/timeasure/profiling/reported_method.rb', line 22 def increment_call_count @call_count += 1 end |
#increment_runtime_sum(runtime) ⇒ Object
18 19 20 |
# File 'lib/timeasure/profiling/reported_method.rb', line 18 def increment_runtime_sum(runtime) @runtime_sum += runtime end |