Class: Spec::Performance::Configuration
- Inherits:
-
Object
- Object
- Spec::Performance::Configuration
- Defined in:
- lib/spec/performance/configuration.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .configure {|instance| ... } ⇒ Object
- .configured_options ⇒ Object
- .default_options ⇒ Object
- .instance ⇒ Object
Instance Method Summary collapse
- #concurrency=(value) ⇒ Object
-
#initialize(options) ⇒ Configuration
constructor
A new instance of Configuration.
- #iterations=(value) ⇒ Object
- #iterations_per_second=(value) ⇒ Object
- #maximum_iteration_time=(value) ⇒ Object
- #performance_driver_base_uri=(value) ⇒ Object
- #performance_driver_class=(value) ⇒ Object
Constructor Details
#initialize(options) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 |
# File 'lib/spec/performance/configuration.rb', line 6 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/spec/performance/configuration.rb', line 4 def @options end |
Class Method Details
.configure {|instance| ... } ⇒ Object
39 40 41 |
# File 'lib/spec/performance/configuration.rb', line 39 def configure(&block) yield(instance) end |
.configured_options ⇒ Object
43 44 45 |
# File 'lib/spec/performance/configuration.rb', line 43 def instance. end |
.default_options ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/spec/performance/configuration.rb', line 47 def { :concurrency => 1, :iterations => 20, :iterations_per_second => nil, :maximum_iteration_time => nil, :performance_driver_class => Spec::Client::HttpClient, :performance_driver_base_uri => "http://localhost/" } end |
.instance ⇒ Object
35 36 37 |
# File 'lib/spec/performance/configuration.rb', line 35 def instance @@instance ||= new() end |
Instance Method Details
#concurrency=(value) ⇒ Object
10 11 12 |
# File 'lib/spec/performance/configuration.rb', line 10 def concurrency=(value) @options[:concurrency] = value end |
#iterations=(value) ⇒ Object
14 15 16 |
# File 'lib/spec/performance/configuration.rb', line 14 def iterations=(value) @options[:iterations] = value end |
#iterations_per_second=(value) ⇒ Object
18 19 20 |
# File 'lib/spec/performance/configuration.rb', line 18 def iterations_per_second=(value) @options[:iterations_per_second] = value end |
#maximum_iteration_time=(value) ⇒ Object
22 23 24 |
# File 'lib/spec/performance/configuration.rb', line 22 def maximum_iteration_time=(value) @options[:maximum_iteration_time] = value end |
#performance_driver_base_uri=(value) ⇒ Object
30 31 32 |
# File 'lib/spec/performance/configuration.rb', line 30 def performance_driver_base_uri=(value) @options[:performance_driver_base_uri] = value end |
#performance_driver_class=(value) ⇒ Object
26 27 28 |
# File 'lib/spec/performance/configuration.rb', line 26 def performance_driver_class=(value) @options[:performance_driver_class] = value end |