Class: Flows::Plugin::Profiler::Report::Tree
- Inherits:
-
Flows::Plugin::Profiler::Report
- Object
- Flows::Plugin::Profiler::Report
- Flows::Plugin::Profiler::Report::Tree
- Defined in:
- lib/flows/plugin/profiler/report/tree.rb,
lib/flows/plugin/profiler/report/tree/node.rb,
lib/flows/plugin/profiler/report/tree/calculated_node.rb
Overview
Tree report. Merges similar calls, saves execution structure (who called whom).
Direct Known Subclasses
Defined Under Namespace
Classes: CalculatedNode, Node
Instance Attribute Summary
Attributes inherited from Flows::Plugin::Profiler::Report
Instance Method Summary collapse
- #add ⇒ Object
-
#to_a ⇒ Array<Hash>
Returns tree report as Ruby data structs.
- #to_s ⇒ Object
Methods inherited from Flows::Plugin::Profiler::Report
Constructor Details
This class inherits a constructor from Flows::Plugin::Profiler::Report
Instance Method Details
#add ⇒ Object
49 50 51 52 |
# File 'lib/flows/plugin/profiler/report/tree.rb', line 49 def add(*) forget_memoized_values super end |
#to_a ⇒ Array<Hash>
Returns tree report as Ruby data structs.
45 46 47 |
# File 'lib/flows/plugin/profiler/report/tree.rb', line 45 def to_a root_calculated_node.children.map { |node| node.to_h(root_calculated_node) } end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/flows/plugin/profiler/report/tree.rb', line 54 def to_s root_calculated_node.children.map { |node| node.to_s(root_calculated_node) }.join end |