module Minitest
Public Class Methods
plugin_stackprof_init(options)
click to toggle source
# File lib/minitest/stackprof_plugin.rb, line 62 def self.plugin_stackprof_init(options) if output_file = options[:stackprof] require 'stackprof' puts "Stackprof enabled - dumping results to #{output_file}" puts "Stackprof: #{"NOT " if !StackProfPlugin.include_setup_and_teardown?} profiling the setup/teardown" Minitest::Test.prepend StackProfPlugin reporter << StackProfReporter.new(output_file) end end
plugin_stackprof_options(opts, options)
click to toggle source
# File lib/minitest/stackprof_plugin.rb, line 54 def self.plugin_stackprof_options(opts, options) opts.on '--profile-setup', 'profile the setup and teardown as well as the test' do StackProfPlugin.include_setup_and_teardown = true end opts.on '--stackprof[=FILE]', String, 'run under stackprof (optionally specifies the output file)' do |file| options[:stackprof] = file || "stackprof-minitest-#{Process.pid}.dump" end end