Class: MockServer::LoadProfile
- Inherits:
-
Object
- Object
- MockServer::LoadProfile
- Defined in:
- lib/mockserver/models.rb
Overview
The traffic-shaping profile of a load scenario: an ordered list of LoadStage objects run in sequence, each holding or ramping a setpoint (virtual users, an arrival rate, or a pause) for its duration. The total run length is the sum of the stage durations.
Instance Attribute Summary collapse
-
#stages ⇒ Object
Returns the value of attribute stages.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stages: []) ⇒ LoadProfile
constructor
A new instance of LoadProfile.
- #to_h ⇒ Object
Constructor Details
#initialize(stages: []) ⇒ LoadProfile
Returns a new instance of LoadProfile.
2378 2379 2380 |
# File 'lib/mockserver/models.rb', line 2378 def initialize(stages: []) @stages = stages || [] end |
Instance Attribute Details
#stages ⇒ Object
Returns the value of attribute stages.
2376 2377 2378 |
# File 'lib/mockserver/models.rb', line 2376 def stages @stages end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
2382 2383 2384 |
# File 'lib/mockserver/models.rb', line 2382 def to_h { 'stages' => @stages.map(&:to_h) } end |