bin/WasThreadStackProcessor in WasThreadStackProcessor-0.1.4 vs bin/WasThreadStackProcessor in WasThreadStackProcessor-0.1.5
- old
+ new
@@ -1,17 +1,23 @@
-#!/usr/bin/env ruby
-
-require 'WasThreadStackProcessor'
-
-threadStackCombinator = ThreadStackCombinator.new
-wasThreadStackProcessor = WasThreadStackProcessor.new(threadStackCombinator)
-
-ARGV.each do |file|
- File.open(file, "r") do |infile|
- wasThreadStackProcessor.process(infile)
- end
-end
-
-extend Hirb::Console
-view wasThreadStackProcessor, :class=>:parent_child_tree, :type=>:basic, :value_method=>:text_count, :indent=>1, :children_method=>:children_sorted
-
-# wasThreadStackProcessor.threadStackCombinator.combinedThreadStacks.each { |combinedThreadStack| puts combinedThreadStack.call.text}
+#!/usr/bin/env ruby
+
+require 'WasThreadStackProcessor'
+
+unless ARGV.length > 0
+ puts "Dude, not any argument."
+ puts "Usage: WasThreadStackProcessor javacore_files\n"
+ exit
+end
+
+threadStackCombinator = ThreadStackCombinator.new
+wasThreadStackProcessor = WasThreadStackProcessor.new(threadStackCombinator)
+
+ARGV.each do |file|
+ File.open(file, "r") do |infile|
+ wasThreadStackProcessor.process(infile)
+ end
+end
+
+extend Hirb::Console
+view wasThreadStackProcessor, :class=>:parent_child_tree, :type=>:basic, :value_method=>:text_count, :indent=>1, :children_method=>:children_sorted
+
+# wasThreadStackProcessor.threadStackCombinator.combinedThreadStacks.each { |combinedThreadStack| puts combinedThreadStack.call.text}