Class: MockServer::LoadPacing
- Inherits:
-
Object
- Object
- MockServer::LoadPacing
- Defined in:
- lib/mockserver/models.rb
Overview
Adaptive iteration pacing (think-time) for a load scenario: a target
per-virtual-user iteration cycle time. mode is one of NONE,
CONSTANT_PACING (+value+ is the target cycle in milliseconds) or
CONSTANT_THROUGHPUT (+value+ is the target iterations/second per VU).
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mode:, value: nil) ⇒ LoadPacing
constructor
A new instance of LoadPacing.
- #to_h ⇒ Object
Constructor Details
#initialize(mode:, value: nil) ⇒ LoadPacing
Returns a new instance of LoadPacing.
3061 3062 3063 3064 |
# File 'lib/mockserver/models.rb', line 3061 def initialize(mode:, value: nil) @mode = mode @value = value end |
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode.
3059 3060 3061 |
# File 'lib/mockserver/models.rb', line 3059 def mode @mode end |
#value ⇒ Object
Returns the value of attribute value.
3059 3060 3061 |
# File 'lib/mockserver/models.rb', line 3059 def value @value end |
Class Method Details
.from_hash(data) ⇒ Object
3073 3074 3075 3076 3077 3078 3079 3080 |
# File 'lib/mockserver/models.rb', line 3073 def self.from_hash(data) return nil if data.nil? new( mode: data['mode'], value: data['value'] ) end |
Instance Method Details
#to_h ⇒ Object
3066 3067 3068 3069 3070 3071 |
# File 'lib/mockserver/models.rb', line 3066 def to_h MockServer.strip_none({ 'mode' => @mode, 'value' => @value }) end |