Class: WasThreadStackProcessor
- Inherits:
-
Object
- Object
- WasThreadStackProcessor
- Defined in:
- lib/WasThreadStackProcessor.rb
Instance Attribute Summary collapse
-
#threadStackCombinator ⇒ Object
Returns the value of attribute threadStackCombinator.
Instance Method Summary collapse
- #children_sorted ⇒ Object
-
#initialize(threadStackCombinator) ⇒ WasThreadStackProcessor
constructor
A new instance of WasThreadStackProcessor.
- #process(file) ⇒ Object
- #text_count ⇒ Object
Constructor Details
#initialize(threadStackCombinator) ⇒ WasThreadStackProcessor
Returns a new instance of WasThreadStackProcessor.
14 15 16 |
# File 'lib/WasThreadStackProcessor.rb', line 14 def initialize(threadStackCombinator) @threadStackCombinator = threadStackCombinator end |
Instance Attribute Details
#threadStackCombinator ⇒ Object
Returns the value of attribute threadStackCombinator.
12 13 14 |
# File 'lib/WasThreadStackProcessor.rb', line 12 def threadStackCombinator @threadStackCombinator end |
Instance Method Details
#children_sorted ⇒ Object
25 26 27 |
# File 'lib/WasThreadStackProcessor.rb', line 25 def children_sorted threadStackCombinator.combinedThreadStacks.compact.sort { |a,b| b.count <=> a.count} end |
#process(file) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/WasThreadStackProcessor.rb', line 18 def process(file) threadStackExtractor = ThreadStackExtractor.new(file) threadStacks = threadStackExtractor.getThreadStacks threadStacks.each { |threadStack| @threadStackCombinator.combine(ThreadStack.new(threadStack))} end |
#text_count ⇒ Object
29 30 31 |
# File 'lib/WasThreadStackProcessor.rb', line 29 def text_count "" end |