bin/stackprof in stackprof-0.2.9 vs bin/stackprof in stackprof-0.2.10

- old
+ new

@@ -20,10 +20,14 @@ o.on('--flamegraph', "timeline-flamegraph output (js)"){ options[:format] = :flamegraph } o.on('--flamegraph-viewer [f.js]', String, "open html viewer for flamegraph output\n\n"){ |file| puts("open file://#{File.expand_path('../../lib/stackprof/flamegraph/viewer.html', __FILE__)}?data=#{File.expand_path(file)}") exit } + o.on('--select-files []', String, 'Show results of matching files'){ |path| (options[:select_files] ||= []) << File.expand_path(path) } + o.on('--reject-files []', String, 'Exclude results of matching files'){ |path| (options[:reject_files] ||= []) << File.expand_path(path) } + o.on('--select-names []', Regexp, 'Show results of matching method names'){ |regexp| (options[:select_names] ||= []) << regexp } + o.on('--reject-names []', Regexp, 'Exclude results of matching method names'){ |regexp| (options[:reject_names] ||= []) << regexp } o.on('--dump', 'Print marshaled profile dump (combine multiple profiles)'){ options[:format] = :dump } o.on('--debug', 'Pretty print raw profile data'){ options[:format] = :debug } end parser.parse! @@ -54,10 +58,10 @@ options = default_options.merge(options) options.delete(:limit) if options[:limit] == 0 case options[:format] when :text - report.print_text(options[:sort], options[:limit]) + report.print_text(options[:sort], options[:limit], options[:select_files], options[:reject_files], options[:select_names], options[:reject_names]) when :debug report.print_debug when :dump report.print_dump when :callgrind