Class: Gridinit::Jmeter::Throughput
- Inherits:
-
Object
- Object
- Gridinit::Jmeter::Throughput
- Includes:
- Helper
- Defined in:
- lib/gridinit-jmeter/controllers/throughput.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(name, percent, params = {}) ⇒ Throughput
constructor
A new instance of Throughput.
Methods included from Helper
Constructor Details
#initialize(name, percent, params = {}) ⇒ Throughput
Returns a new instance of Throughput.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gridinit-jmeter/controllers/throughput.rb', line 7 def initialize(name, percent, params={}) @doc = Nokogiri::XML(" <ThroughputController guiclass=\"ThroughputControllerGui\" testclass=\"ThroughputController\" testname=\"\#{percent.to_i}%_\#{name}\" enabled=\"true\">\n <intProp name=\"ThroughputController.style\">1</intProp>\n <boolProp name=\"ThroughputController.perThread\">false</boolProp>\n <intProp name=\"ThroughputController.maxThroughput\">1</intProp>\n <FloatProperty>\n <name>ThroughputController.percentThroughput</name>\n <value>\#{percent.to_f}</value>\n <savedValue>0.0</savedValue>\n </FloatProperty>\n </ThroughputController>\n EOF\n update params\nend\n".strip_heredoc) |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
5 6 7 |
# File 'lib/gridinit-jmeter/controllers/throughput.rb', line 5 def doc @doc end |