module Minitest::TestProf

def self.configure_options(options = {})

:nodoc:
:nodoc:
def self.configure_options(options = {})
  options.tap do |opts|
    opts[:event] = ENV["EVENT_PROF"] if ENV["EVENT_PROF"]
    opts[:rank_by] = ENV["EVENT_PROF_RANK"].to_sym if ENV["EVENT_PROF_RANK"]
    opts[:top_count] = ENV["EVENT_PROF_TOP"].to_i if ENV["EVENT_PROF_TOP"]
    opts[:per_example] = true if ENV["EVENT_PROF_EXAMPLES"]
    opts[:fdoc] = true if ENV["FDOC"]
    opts[:sample] = true if ENV["SAMPLE"] || ENV["SAMPLE_GROUPS"]
    opts[:mem_prof_mode] = ENV["TEST_MEM_PROF"] if ENV["TEST_MEM_PROF"]
    opts[:mem_prof_top_count] = ENV["TEST_MEM_PROF_COUNT"] if ENV["TEST_MEM_PROF_COUNT"]
    opts[:tag_prof] = true if ENV["TAG_PROF"] == "type"
  end
end