Class: FactoryBotInstruments::Benchmark
- Inherits:
-
Struct
- Object
- Struct
- FactoryBotInstruments::Benchmark
- Defined in:
- lib/factory_bot_instruments/benchmarking.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#factory ⇒ Object
Returns the value of attribute factory.
-
#method ⇒ Object
Returns the value of attribute method.
Instance Method Summary collapse
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration
34 35 36 |
# File 'lib/factory_bot_instruments/benchmarking.rb', line 34 def duration @duration end |
#factory ⇒ Object
Returns the value of attribute factory
34 35 36 |
# File 'lib/factory_bot_instruments/benchmarking.rb', line 34 def factory @factory end |
#method ⇒ Object
Returns the value of attribute method
34 35 36 |
# File 'lib/factory_bot_instruments/benchmarking.rb', line 34 def method @method end |
Instance Method Details
#to_s ⇒ Object
35 36 37 38 39 |
# File 'lib/factory_bot_instruments/benchmarking.rb', line 35 def to_s formated_duration = format("%5.3fs", duration) "#{formated_duration}: FactoryBot.#{method}(:#{factory})" end |