class TestProf::FactoryProf::Configuration

FactoryProf configuration

Attributes

mode[RW]
printer[RW]

Public Class Methods

new() click to toggle source
# File lib/test_prof/factory_prof.rb, line 20
def initialize
  @mode = ENV["FPROF"] == "flamegraph" ? :flamegraph : :simple
  @printer =
    case ENV["FPROF"]
    when "flamegraph"
      Printers::Flamegraph
    when "nate_heckler"
      Printers::NateHeckler
    else
      Printers::Simple
    end
end

Public Instance Methods

flamegraph?() click to toggle source

Whether we want to generate flamegraphs

# File lib/test_prof/factory_prof.rb, line 34
def flamegraph?
  @mode == :flamegraph
end