Sha256: bed19c527811fb39da89cd9648e3e24a935ccfb56d23d73091082058c20b5984

Contents?: true

Size: 914 Bytes

Versions: 14

Compression:

Stored size: 914 Bytes

Contents

module RubyJmeter
  class DSL
    def constant_throughput_timer(params={}, &block)
      node = RubyJmeter::ConstantThroughputTimer.new(params)
      attach_node(node, &block)
    end
  end

  class ConstantThroughputTimer
    attr_accessor :doc
    include Helper

    def initialize(params={})
      testname = params.kind_of?(Array) ? 'ConstantThroughputTimer' : (params[:name] || 'ConstantThroughputTimer')
      @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="#{testname}" enabled="true">
  <stringProp name="calcMode">this thread only</stringProp>
  <doubleProp>
    <name>throughput</name>
    <value>0.0</value>
    <savedValue>0.0</savedValue>
  </doubleProp>
</ConstantThroughputTimer>)
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby-jmeter-2.1.7 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.6 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.5 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.4 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.3 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.2 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.1 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.1.0 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.9 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.8 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.7 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.6 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.5 lib/ruby-jmeter/dsl/constant_throughput_timer.rb
ruby-jmeter-2.0.4 lib/ruby-jmeter/dsl/constant_throughput_timer.rb