module Minitest

def self.plugin_test_prof_init(options)

def self.plugin_test_prof_init(options)
  options = TestProf.configure_options(options)
  reporter << TestProf::EventProfReporter.new(options[:io], options) if options[:event]
  reporter << TestProf::FactoryDoctorReporter.new(options[:io], options) if options[:fdoc]
  reporter << TestProf::MemoryProfReporter.new(options[:io], options) if options[:mem_prof_mode]
  reporter << Minitest::TestProf::TagProfReporter.new(options[:io], options) if options[:tag_prof]
  ::TestProf::MinitestSample.call if options[:sample]
end

def self.plugin_test_prof_options(opts, options)

def self.plugin_test_prof_options(opts, options)
  opts.on "--event-prof=EVENT", "Collects metrics for specified EVENT" do |event|
    options[:event] = event
  end
  opts.on "--event-prof-rank-by=RANK_BY", "Defines RANK_BY parameter for results" do |rank|
    options[:rank_by] = rank.to_sym
  end
  opts.on "--event-prof-top-count=N", "Limits results with N groups/examples" do |count|
    options[:top_count] = count.to_i
  end
  opts.on "--event-prof-per-example", TrueClass, "Includes examples metrics to results" do |flag|
    options[:per_example] = flag
  end
  opts.on "--factory-doctor", TrueClass, "Enable Factory Doctor for your examples" do |flag|
    options[:fdoc] = flag
  end
  opts.on "--mem-prof=MODE", "Enable MemoryProf for your examples" do |flag|
    options[:mem_prof_mode] = flag
  end
  opts.on "--mem-prof-top-count=N", "Limits MemoryProf results with N groups/examples" do |flag|
    options[:mem_prof_top_count] = flag
  end
end