Class: Gridinit::Jmeter::GCThroughputShapingTimer
- Inherits:
-
Object
- Object
- Gridinit::Jmeter::GCThroughputShapingTimer
- Includes:
- Helper
- Defined in:
- lib/gridinit-jmeter/plugins/gc_variable_throughput_timer.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(name, steps, params = {}) ⇒ GCThroughputShapingTimer
constructor
A new instance of GCThroughputShapingTimer.
Methods included from Helper
#enabled, #update, #update_at_xpath
Constructor Details
#initialize(name, steps, params = {}) ⇒ GCThroughputShapingTimer
Returns a new instance of GCThroughputShapingTimer.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gridinit-jmeter/plugins/gc_variable_throughput_timer.rb', line 7 def initialize(name, steps, params={}) @doc = Nokogiri::XML(" <kg.apc.jmeter.timers.VariableThroughputTimer guiclass=\"kg.apc.jmeter.timers.VariableThroughputTimerGui\" testclass=\"kg.apc.jmeter.timers.VariableThroughputTimer\" testname=\"\#{name}\" enabled=\"true\">\n <collectionProp name=\"load_profile\"/>\n </kg.apc.jmeter.timers.VariableThroughputTimer>\n EOF\n steps.each_with_index do |step, index|\n @doc.at_xpath('//collectionProp') << \n Nokogiri::XML(<<-EOF.strip_heredoc).children\n <collectionProp name=\"step_\#{index}\">\n <stringProp name=\"start_rps_\#{index}\">\#{step[:start_rps]}</stringProp>\n <stringProp name=\"end_rps_\#{index}\">\#{step[:end_rps]}</stringProp>\n <stringProp name=\"duration_sec_\#{index}\">\#{step[:duration]}</stringProp>\n </collectionProp>\n EOF\n end\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/plugins/gc_variable_throughput_timer.rb', line 5 def doc @doc end |