Last active
February 16, 2017 14:24
-
-
Save denisovlev/c617deea1c34e5a89150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = RubyProf.profile { | |
enqueue_stats(cur_line_time, stat_time_block) | |
} | |
open('output2.html', 'w') do |f| | |
RubyProf::GraphHtmlPrinter.new(result).print(f, :min_percent => 5) | |
end | |
# https://github.com/ruby-prof/ruby-prof/blob/master/examples/graph.txt | |
# merge fibers | |
prof = RubyProf::Profile.new(merge_fibers: true) | |
prof.start | |
Acquisition::CreateWorkloadService.new(log).create_clustered_workload(User.with_role(:admin).first, opts) | |
result = prof.stop | |
result.eliminate_methods!([/Hash#each/, /Array#map/, /Array#each/, /Class#new/, /Set#each/, /Enumerator#next/, /Kernel#loop/, /Enumerator#each/, /Enumerable#map/]) | |
open('output2.html', 'w') do |f| | |
RubyProf::GraphHtmlPrinter.new(result).print(f, :min_percent => 5) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment