Module: Minitest
- Defined in:
- lib/minitest/test_prof_plugin.rb,
lib/minitest/base_reporter.rb,
lib/test_prof/tag_prof/minitest.rb,
lib/minitest/event_prof_formatter.rb,
lib/test_prof/event_prof/minitest.rb,
lib/test_prof/memory_prof/minitest.rb,
lib/test_prof/factory_doctor/minitest.rb
Overview
:nodoc:
Defined Under Namespace
Modules: TestProf
Class Method Summary collapse
Class Method Details
.plugin_test_prof_init(options) ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/minitest/test_prof_plugin.rb', line 49 def self.plugin_test_prof_init() = TestProf.() reporter << TestProf::EventProfReporter.new([:io], ) if [:event] reporter << TestProf::FactoryDoctorReporter.new([:io], ) if [:fdoc] reporter << TestProf::MemoryProfReporter.new([:io], ) if [:mem_prof_mode] reporter << Minitest::TestProf::TagProfReporter.new([:io], ) if [:tag_prof] ::TestProf::MinitestSample.call if [:sample] end |
.plugin_test_prof_options(opts, options) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/minitest/test_prof_plugin.rb', line 25 def self.(opts, ) opts.on "--event-prof=EVENT", "Collects metrics for specified EVENT" do |event| [:event] = event end opts.on "--event-prof-rank-by=RANK_BY", "Defines RANK_BY parameter for results" do |rank| [:rank_by] = rank.to_sym end opts.on "--event-prof-top-count=N", "Limits results with N groups/examples" do |count| [:top_count] = count.to_i end opts.on "--event-prof-per-example", TrueClass, "Includes examples metrics to results" do |flag| [:per_example] = flag end opts.on "--factory-doctor", TrueClass, "Enable Factory Doctor for your examples" do |flag| [:fdoc] = flag end opts.on "--mem-prof=MODE", "Enable MemoryProf for your examples" do |flag| [:mem_prof_mode] = flag end opts.on "--mem-prof-top-count=N", "Limits MemoryProf results with N groups/examples" do |flag| [:mem_prof_top_count] = flag end end |