Class: WasThreadStackProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/WasThreadStackProcessor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#threadStackCombinatorObject

Returns the value of attribute threadStackCombinator.



12
13
14
# File 'lib/WasThreadStackProcessor.rb', line 12

def threadStackCombinator
  @threadStackCombinator
end

Instance Method Details

#children_sortedObject



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_countObject



29
30
31
# File 'lib/WasThreadStackProcessor.rb', line 29

def text_count
	""
end