class RubyProf::FlameGraphJsonPrinter
Public Instance Methods
min_percent()
click to toggle source
# File lib/ruby-prof/printers/flame_graph_json_printer.rb, line 5 def min_percent @options[:min_percent] || 0.25 end
min_self_time()
click to toggle source
# File lib/ruby-prof/printers/flame_graph_json_printer.rb, line 9 def min_self_time @options[:min_self_time] || 0.001 end
only_threads()
click to toggle source
# File lib/ruby-prof/printers/flame_graph_json_printer.rb, line 13 def only_threads @options[:only_threads] end
print_threads()
click to toggle source
# File lib/ruby-prof/printers/flame_graph_json_printer.rb, line 17 def print_threads @threads = @result.threads.dup @threads.select! { |t| only_thread_ids.include?(t.id) } if only_threads walker = FlameDataWalker.new(@output, @threads, { min_percent: min_percent, min_self_time: min_self_time }) @output << "{\n" @output << " \"root\": " walker.run @output << ",\n" @output << " \"depth\": #{walker.height}\n" @output << "}" end
Private Instance Methods
only_thread_ids()
click to toggle source
# File lib/ruby-prof/printers/flame_graph_json_printer.rb, line 38 def only_thread_ids only_threads && only_threads.map(&:object_id) end