Permalink
Browse files

Add option --exclude-common-cycles to exclude common iterators

  • Loading branch information...
1 parent b9da6c7 commit fbd8ef8dee198c153cd9a8696365ce1344bd997d @Vasfed committed Apr 27, 2012
Showing with 29 additions and 0 deletions.
  1. +29 −0 bin/ruby-prof
View
@@ -182,6 +182,35 @@ opts = OptionParser.new do |opts|
options.eliminate_methods_files ||= []
options.eliminate_methods_files << file
end
+
+ opts.on('--exclude-common-cycles', 'make common iterators like Integer#times appear inlined') do|meth|
+ options.eliminate_methods ||= []
+ options.eliminate_methods += %w{
+ Integer#times
+ Integer#upto
+ Integer#downto
+ Enumerator#each
+ Enumerator#each_with_index
+ Enumerator#each_with_object
+
+ Array#each
+ Array#each_index
+ Array#reverse_each
+
+ Hash#each
+ Hash#each_pair
+ Hash#each_key
+ Hash#each_value
+
+ Range#each
+ Enumerable#each_cons
+ Enumerable#each_entry
+ Enumerable#each_slice
+ Enumerable#each_with_index
+ Enumerable#each_with_object
+ Enumerable#reverse_each
+ }
+ end
end
begin

0 comments on commit fbd8ef8

Please sign in to comment.