Module: Minitest
- Defined in:
- lib/minitest/stackprofit_plugin.rb
Defined Under Namespace
Modules: Stackprofit
Class Method Summary collapse
-
.plugin_stackprofit_init(options) ⇒ Object
:nodoc:.
-
.plugin_stackprofit_options(opts, options) ⇒ Object
:nodoc:.
Class Method Details
.plugin_stackprofit_init(options) ⇒ Object
:nodoc:
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/minitest/stackprofit_plugin.rb', line 21 def self.plugin_stackprofit_init # :nodoc: if @stackprof_path then require "stackprof" StackProf.start mode: @stackprof_type, out: @stackprof_path Minitest.after_run do StackProf.stop StackProf.results end end end |
.plugin_stackprofit_options(opts, options) ⇒ Object
:nodoc:
11 12 13 14 15 16 17 18 19 |
# File 'lib/minitest/stackprofit_plugin.rb', line 11 def self. opts, # :nodoc: opts.on "--stackprof [path]", String, "Save profiling to [path]." do |s| @stackprof_path = s || "stackprof.dump" end opts.on "--stackprof-type type", String, "Set profile type (default: wall)." do |s| @stackprof_type = s.to_sym end end |