overridden by each implementation
# File lib/active_support/testing/performance/rubinius.rb, line 39 def record return unless @supported if(full_profile_options[:formats].include?(:flat)) create_path_and_open_file(:flat) do |file| @profiler.show(file) end end if(full_profile_options[:formats].include?(:graph)) create_path_and_open_file(:graph) do |file| @profiler.show(file) end end end
# File lib/active_support/testing/performance/rubinius.rb, line 27 def run return unless @supported @profiler = Rubinius::Profiler::Instrumenter.new @total = time_with_block do @profiler.profile(false) do full_profile_options[:runs].to_i.times { run_test(@metric, :profile) } end end end
# File lib/active_support/testing/performance/rubinius.rb, line 56 def create_path_and_open_file(printer_name) fname = "#{output_filename}_#{printer_name}.txt" FileUtils.mkdir_p(File.dirname(fname)) File.open(fname, 'wb') do |file| yield(file) end end
# File lib/active_support/testing/performance/jruby.rb, line 52 def output_filename(printer_class) suffix = case printer_class.name.demodulize when 'FlatProfilePrinter'; 'flat.txt' when 'GraphProfilePrinter'; 'graph.txt' else printer_class.name.sub(/ProfilePrinter$/, '').underscore end "#{super()}_#{suffix}" end
Generated with the Darkfish Rdoc Generator 2.