Skip to content

Commit

Permalink
Add option --exclude-common-cycles to exclude common iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasfed committed Apr 27, 2012
1 parent b9da6c7 commit fbd8ef8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions bin/ruby-prof
Expand Up @@ -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
Expand Down

0 comments on commit fbd8ef8

Please sign in to comment.