class TestProf::FactoryProf::Configuration

FactoryProf configuration

def flamegraph?

Whether we want to generate flamegraphs
def flamegraph?
  @mode == :flamegraph
end

def initialize

def initialize
  @mode = (ENV["FPROF"] == "flamegraph") ? :flamegraph : :simple
  @printer =
    case ENV["FPROF"]
    when "flamegraph"
      Printers::Flamegraph
    when "nate_heckler"
      Printers::NateHeckler
    when "json"
      Printers::Json
    else
      Printers::Simple
    end
  @threshold = ENV.fetch("FPROF_THRESHOLD", 0).to_i
  @include_variations = ENV["FPROF_VARS"] == "1"
  @variations_limit = ENV.fetch("FPROF_VARIATIONS_LIMIT", 2).to_i
end