bin/stackprof in stackprof-0.2.10 vs bin/stackprof in stackprof-0.2.11
- old
+ new
@@ -10,11 +10,12 @@
o.on('--text', 'Text summary per method (default)'){ options[:format] = :text }
o.on('--files', 'List of files'){ |f| options[:format] = :files }
o.on('--limit [num]', Integer, 'Limit --text, --files, or --graphviz output to N entries'){ |n| options[:limit] = n }
o.on('--sort-total', "Sort --text or --files output on total samples\n\n"){ options[:sort] = true }
o.on('--method [grep]', 'Zoom into specified method'){ |f| options[:format] = :method; options[:filter] = f }
- o.on('--file [grep]', "Show annotated code for specified file\n\n"){ |f| options[:format] = :file; options[:filter] = f }
+ o.on('--file [grep]', "Show annotated code for specified file"){ |f| options[:format] = :file; options[:filter] = f }
+ o.on('--walk', "Walk the stacktrace interactively\n\n"){ |f| options[:walk] = true }
o.on('--callgrind', 'Callgrind output (use with kcachegrind, stackprof-gprof2dot.py)'){ options[:format] = :callgrind }
o.on('--graphviz', "Graphviz output (use with dot)"){ options[:format] = :graphviz }
o.on('--node-fraction [frac]', OptionParser::DecimalNumeric, 'Drop nodes representing less than [frac] fraction of samples'){ |n| options[:node_fraction] = n }
o.on('--stackcollapse', 'stackcollapse.pl compatible output (use with stackprof-flamegraph.pl)'){ options[:format] = :stackcollapse }
o.on('--flamegraph', "timeline-flamegraph output (js)"){ options[:format] = :flamegraph }
@@ -72,10 +73,10 @@
when :stackcollapse
report.print_stackcollapse
when :flamegraph
report.print_flamegraph
when :method
- report.print_method(options[:filter])
+ options[:walk] ? report.walk_method(options[:filter]) : report.print_method(options[:filter])
when :file
report.print_file(options[:filter])
when :files
report.print_files(options[:sort], options[:limit])
else