Class: RSpec::Benchmark::Configuration
- Inherits:
-
Object
- Object
- RSpec::Benchmark::Configuration
- Defined in:
- lib/rspec/benchmark/configuration.rb
Instance Attribute Summary collapse
-
#disable_gc ⇒ Object
GC is enabled to measure real performance.
-
#fit_quality ⇒ Float
The fit quality in computational complexity.
-
#format ⇒ String
The formatting for number of iterations.
-
#run_in_subprocess ⇒ Object
Isolate benchmark time measurement in child process By default false due to Rails loosing DB connections.
-
#samples ⇒ Integer
How many times to repeat measurements.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
private
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Configuration.
39 40 41 42 43 44 45 |
# File 'lib/rspec/benchmark/configuration.rb', line 39 def initialize @disable_gc = false @samples = 1 @fit_quality = 0.9 @format = :human @run_in_subprocess = false end |
Instance Attribute Details
#disable_gc ⇒ Object
GC is enabled to measure real performance
15 16 17 |
# File 'lib/rspec/benchmark/configuration.rb', line 15 def disable_gc @disable_gc end |
#fit_quality ⇒ Float
The fit quality in computational complexity
29 30 31 |
# File 'lib/rspec/benchmark/configuration.rb', line 29 def fit_quality @fit_quality end |
#format ⇒ String
The formatting for number of iterations
36 37 38 |
# File 'lib/rspec/benchmark/configuration.rb', line 36 def format @format end |
#run_in_subprocess ⇒ Object
Isolate benchmark time measurement in child process By default false due to Rails loosing DB connections
10 11 12 |
# File 'lib/rspec/benchmark/configuration.rb', line 10 def run_in_subprocess @run_in_subprocess end |
#samples ⇒ Integer
How many times to repeat measurements
22 23 24 |
# File 'lib/rspec/benchmark/configuration.rb', line 22 def samples @samples end |