Class: TestProf::FactoryProf::Configuration
- Inherits:
-
Object
- Object
- TestProf::FactoryProf::Configuration
- Defined in:
- lib/test_prof/factory_prof.rb
Overview
FactoryProf configuration
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
Instance Method Summary collapse
-
#flamegraph? ⇒ Boolean
Whether we want to generate flamegraphs.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 |
# File 'lib/test_prof/factory_prof.rb', line 19 def initialize @mode = ENV['FPROF'] == 'flamegraph' ? :flamegraph : :simple end |
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode.
17 18 19 |
# File 'lib/test_prof/factory_prof.rb', line 17 def mode @mode end |
Instance Method Details
#flamegraph? ⇒ Boolean
Whether we want to generate flamegraphs
24 25 26 |
# File 'lib/test_prof/factory_prof.rb', line 24 def flamegraph? @mode == :flamegraph end |