ruby-jmeter 2.11.9 → 2.11.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +0 -1
  4. data/bin/{grid → flood} +1 -1
  5. data/examples/basic_json_path_extractor.rb +12 -0
  6. data/lib/ruby-jmeter/dsl.rb +23 -19
  7. data/lib/ruby-jmeter/plugins/console_status_logger.rb +14 -0
  8. data/lib/ruby-jmeter/plugins/dummy_sampler.rb +23 -0
  9. data/lib/ruby-jmeter/plugins/json_path_extractor.rb +20 -0
  10. data/lib/ruby-jmeter/plugins/latencies_over_time.rb +48 -0
  11. data/lib/ruby-jmeter/plugins/response_codes_per_second.rb +48 -0
  12. data/lib/ruby-jmeter/plugins/response_times_distribution.rb +48 -0
  13. data/lib/ruby-jmeter/plugins/response_times_over_time.rb +49 -0
  14. data/lib/ruby-jmeter/plugins/response_times_percentiles.rb +49 -0
  15. data/lib/ruby-jmeter/plugins/transactions_per_second.rb +49 -0
  16. data/lib/ruby-jmeter/plugins/variable_throughput_timer.rb +26 -0
  17. data/lib/ruby-jmeter/version.rb +1 -1
  18. data/ruby-jmeter.gemspec +3 -3
  19. data/spec/dsl_spec.rb +16 -0
  20. metadata +28 -26
  21. data/lib/ruby-jmeter/plugins/gc_console_status_logger.rb +0 -14
  22. data/lib/ruby-jmeter/plugins/gc_dummy_sampler.rb +0 -23
  23. data/lib/ruby-jmeter/plugins/gc_latencies_over_time.rb +0 -48
  24. data/lib/ruby-jmeter/plugins/gc_response_codes_per_second.rb +0 -48
  25. data/lib/ruby-jmeter/plugins/gc_response_times_distribution.rb +0 -47
  26. data/lib/ruby-jmeter/plugins/gc_response_times_over_time.rb +0 -48
  27. data/lib/ruby-jmeter/plugins/gc_response_times_percentiles.rb +0 -48
  28. data/lib/ruby-jmeter/plugins/gc_transactions_per_second.rb +0 -48
  29. data/lib/ruby-jmeter/plugins/gc_variable_throughput_timer.rb +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 364b3c932e81a8d896c5c79a0d3bd34bd3d1ed3b
4
- data.tar.gz: 25a8fc5ef8549bef2f84cc23f71332b0a5729cff
3
+ metadata.gz: 4773c5365592998c6d1cc60058034d36fbcf6a10
4
+ data.tar.gz: 1720ec95ab23cb8f6d51bef69ea0985af00df34d
5
5
  SHA512:
6
- metadata.gz: d5ec776fbc3bcfeb18ee8f18b7d5001cabfe328d397f772f546006303fd0fd195fa6b30c39f79ecc3c5909feb196c6d583f77ffdd6c9bb4b373c735842da1202
7
- data.tar.gz: d22b98b39df23d4bc1f32d8a28c1c56cf847c76c88e8260a242c4dd1bf13e6f3a165f27d998a120fc049cf6233c0351d03c01fcf38eb6db4c4d1fb1a70c5d20a
6
+ metadata.gz: b33d8bdff32b78d969fb16e5525d2177f1b2af775d6570ac71cc2d8594ff0235a710415076fc929dc331eb3a866f0f1670ca7b02026f5c06ec905f3c6acd61cd
7
+ data.tar.gz: d00d654d034c7de1d4f97147b8d1d274471e35912fb8d62d6d2c85c090fd4130c8b15a577e08d138930dbf9ee7f11af9a32af8cb0226ff7bc3eae8d9bca795c6
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.0.0-p353
1
+ 2.1.1
data/Gemfile CHANGED
@@ -23,5 +23,4 @@ group :test do
23
23
  gem 'rspec'
24
24
  gem 'sinatra'
25
25
  gem 'haml'
26
- gem 'pry-debugger', :require => 'pry-debugger'
27
26
  end
data/bin/{grid → flood} RENAMED
@@ -5,7 +5,7 @@ require 'ruby-jmeter'
5
5
 
6
6
  def usage(why = nil)
7
7
  puts "failed for reason: #{why}" if why
8
- puts "usage: grid [testplan.rb] "
8
+ puts "usage: flood [testplan.rb] "
9
9
  puts " The tesplan is optional, if you leave it off you'll get an interactive shell."
10
10
  exit(1)
11
11
  end
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 1 do
6
+ visit 'https://flood.io/d384673f64e3a3/result.json' do
7
+ extract json: '.apdex.score', name: 'apdex'
8
+ end
9
+ end
10
+
11
+ # end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
12
+ end.flood(ENV['FLOOD_API_TOKEN'])
@@ -311,10 +311,14 @@ module RubyJmeter
311
311
  params[:regex] = params[:regex] #CGI.escapeHTML
312
312
  params[:template] = params[:template] || "$1$"
313
313
  RubyJmeter::RegularExpressionExtractor.new(params)
314
- else
314
+ elsif params[:xpath]
315
315
  params[:refname] = params[:name]
316
316
  params[:xpathQuery] = params[:xpath]
317
317
  RubyJmeter::XpathExtractor.new(params)
318
+ elsif params[:json]
319
+ params[:VAR] = params[:name]
320
+ params[:JSONPATH] = params[:json]
321
+ RubyJmeter::Plugins::JsonPathExtractor.new(params)
318
322
  end
319
323
  attach_node(node, &block)
320
324
  end
@@ -358,52 +362,52 @@ module RubyJmeter
358
362
  ##
359
363
  # JMeter Plugins
360
364
 
361
- def response_codes_per_second(name="jp@gc - Response Codes per Second", params={}, &block)
362
- node = RubyJmeter::GCResponseCodesPerSecond.new(name, params)
365
+ def response_codes_per_second(name="Response Codes per Second", params={}, &block)
366
+ node = RubyJmeter::Plugins::ResponseCodesPerSecond.new(name, params)
363
367
  attach_node(node, &block)
364
368
  end
365
369
 
366
- def response_times_distribution(name="jp@gc - Response Times Distribution", params={}, &block)
367
- node = RubyJmeter::GCResponseTimesDistribution.new(name, params)
370
+ def response_times_distribution(name="Response Times Distribution", params={}, &block)
371
+ node = RubyJmeter::Plugins::ResponseTimesDistribution.new(name, params)
368
372
  attach_node(node, &block)
369
373
  end
370
374
 
371
- def response_times_over_time(name="jp@gc - Response Times Over Time", params={}, &block)
372
- node = RubyJmeter::GCResponseTimesOverTime.new(name, params)
375
+ def response_times_over_time(name="Response Times Over Time", params={}, &block)
376
+ node = RubyJmeter::Plugins::ResponseTimesOverTime.new(name, params)
373
377
  attach_node(node, &block)
374
378
  end
375
379
 
376
- def response_times_percentiles(name="jp@gc - Response Times Percentiles", params={}, &block)
377
- node = RubyJmeter::GCResponseTimesPercentiles.new(name, params)
380
+ def response_times_percentiles(name="Response Times Percentiles", params={}, &block)
381
+ node = RubyJmeter::Plugins::ResponseTimesPercentiles.new(name, params)
378
382
  attach_node(node, &block)
379
383
  end
380
384
 
381
- def transactions_per_second(name="jp@gc - Transactions per Second", params={}, &block)
382
- node = RubyJmeter::GCTransactionsPerSecond.new(name, params)
385
+ def transactions_per_second(name="Transactions per Second", params={}, &block)
386
+ node = RubyJmeter::Plugins::TransactionsPerSecond.new(name, params)
383
387
  attach_node(node, &block)
384
388
  end
385
389
 
386
- def latencies_over_time(name="jp@gc - Response Latencies Over Time", params={}, &block)
387
- node = RubyJmeter::GCLatenciesOverTime.new(name, params)
390
+ def latencies_over_time(name="Response Latencies Over Time", params={}, &block)
391
+ node = RubyJmeter::Plugins::LatenciesOverTime.new(name, params)
388
392
  attach_node(node, &block)
389
393
  end
390
394
 
391
- def console_status_logger(name="jp@gc - Console Status Logger", params={}, &block)
392
- node = RubyJmeter::GCConsoleStatusLogger.new(name, params)
395
+ def console_status_logger(name="Console Status Logger", params={}, &block)
396
+ node = RubyJmeter::Plugins::ConsoleStatusLogger.new(name, params)
393
397
  attach_node(node, &block)
394
398
  end
395
399
 
396
400
  alias_method :console, :console_status_logger
397
401
 
398
- def throughput_shaper(name="jp@gc - Throughput Shaping Timer", steps=[], params={}, &block)
399
- node = RubyJmeter::GCThroughputShapingTimer.new(name, steps)
402
+ def throughput_shaper(name="Throughput Shaping Timer", steps=[], params={}, &block)
403
+ node = RubyJmeter::Plugins::ThroughputShapingTimer.new(name, steps)
400
404
  attach_node(node, &block)
401
405
  end
402
406
 
403
407
  alias_method :shaper, :throughput_shaper
404
408
 
405
- def dummy_sampler(name="jp@gc - Dummy Sampler", params={}, &block)
406
- node = RubyJmeter::GCDummySampler.new(name, params)
409
+ def dummy_sampler(name="Dummy Sampler", params={}, &block)
410
+ node = RubyJmeter::Plugins::DummySampler.new(name, params)
407
411
  attach_node(node, &block)
408
412
  end
409
413
 
@@ -0,0 +1,14 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ConsoleStatusLogger
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.reporters.ConsoleStatusLogger guiclass="kg.apc.jmeter.reporters.ConsoleStatusLoggerGui" testclass="kg.apc.jmeter.reporters.ConsoleStatusLogger" testname="#{name}" enabled="true"/>
9
+ EOF
10
+ update params
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class DummySampler
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.samplers.DummySampler guiclass="kg.apc.jmeter.samplers.DummySamplerGui" testclass="kg.apc.jmeter.samplers.DummySampler" testname="jp@gc - Dummy Sampler" enabled="true">
9
+ <boolProp name="WAITING">true</boolProp>
10
+ <boolProp name="SUCCESFULL">true</boolProp>
11
+ <stringProp name="RESPONSE_CODE">200</stringProp>
12
+ <stringProp name="RESPONSE_MESSAGE">OK</stringProp>
13
+ <stringProp name="REQUEST_DATA"></stringProp>
14
+ <stringProp name="RESPONSE_DATA"></stringProp>
15
+ <stringProp name="RESPONSE_TIME">0</stringProp>
16
+ <stringProp name="LATENCY">0</stringProp>
17
+ </kg.apc.jmeter.samplers.DummySampler>
18
+ EOF
19
+ update params
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class JsonPathExtractor
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(params={})
7
+ testname = params.kind_of?(Array) ? 'XpathExtractor' : (params[:name] || 'XpathExtractor')
8
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
+ <com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.gui.JSONPathExtractorGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor" testname="jp@gc - JSON Path Extractor" enabled="true">
10
+ <stringProp name="VAR"></stringProp>
11
+ <stringProp name="JSONPATH"></stringProp>
12
+ </com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor>
13
+ EOF
14
+ update params
15
+ update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
16
+ end
17
+ end
18
+ end
19
+ end
20
+
@@ -0,0 +1,48 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class LatenciesOverTime
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.LatenciesOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">500</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,48 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ResponseCodesPerSecond
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseCodesPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">1000</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,48 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ResponseTimesDistribution
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesDistributionGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">100</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,49 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ResponseTimesOverTime
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">500</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
49
+
@@ -0,0 +1,49 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ResponseTimesPercentiles
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesPercentilesGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">500</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
49
+
@@ -0,0 +1,49 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class TransactionsPerSecond
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.TransactionsPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
10
+ <objProp>
11
+ <name>saveConfig</name>
12
+ <value class="SampleSaveConfiguration">
13
+ <time>true</time>
14
+ <latency>true</latency>
15
+ <timestamp>true</timestamp>
16
+ <success>true</success>
17
+ <label>true</label>
18
+ <code>true</code>
19
+ <message>true</message>
20
+ <threadName>true</threadName>
21
+ <dataType>true</dataType>
22
+ <encoding>false</encoding>
23
+ <assertions>true</assertions>
24
+ <subresults>true</subresults>
25
+ <responseData>false</responseData>
26
+ <samplerData>false</samplerData>
27
+ <xml>true</xml>
28
+ <fieldNames>false</fieldNames>
29
+ <responseHeaders>false</responseHeaders>
30
+ <requestHeaders>false</requestHeaders>
31
+ <responseDataOnError>false</responseDataOnError>
32
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
+ <assertionsResultsToSave>0</assertionsResultsToSave>
34
+ <bytes>true</bytes>
35
+ </value>
36
+ </objProp>
37
+ <stringProp name="filename"></stringProp>
38
+ <longProp name="interval_grouping">1000</longProp>
39
+ <boolProp name="graph_aggregated">false</boolProp>
40
+ <stringProp name="include_sample_labels"></stringProp>
41
+ <stringProp name="exclude_sample_labels"></stringProp>
42
+ </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
+ EOF
44
+ update params
45
+ end
46
+ end
47
+ end
48
+ end
49
+
@@ -0,0 +1,26 @@
1
+ module RubyJmeter
2
+ module Plugins
3
+ class ThroughputShapingTimer
4
+ attr_accessor :doc
5
+ include Helper
6
+ def initialize(name, steps, params={})
7
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
+ <kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="#{name}" enabled="true">
9
+ <collectionProp name="load_profile"/>
10
+ </kg.apc.jmeter.timers.VariableThroughputTimer>
11
+ EOF
12
+ steps.each_with_index do |step, index|
13
+ @doc.at_xpath('//collectionProp') <<
14
+ Nokogiri::XML(<<-EOF.strip_heredoc).children
15
+ <collectionProp name="step_#{index}">
16
+ <stringProp name="start_rps_#{index}">#{step[:start_rps]}</stringProp>
17
+ <stringProp name="end_rps_#{index}">#{step[:end_rps]}</stringProp>
18
+ <stringProp name="duration_sec_#{index}">#{step[:duration]}</stringProp>
19
+ </collectionProp>
20
+ EOF
21
+ end
22
+ update params
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.9"
2
+ VERSION = "2.11.10"
3
3
  end
data/ruby-jmeter.gemspec CHANGED
@@ -8,15 +8,15 @@ Gem::Specification.new do |gem|
8
8
  gem.version = RubyJmeter::VERSION
9
9
  gem.authors = ["Tim Koopmans"]
10
10
  gem.email = ["support@flood.io"]
11
- gem.description = %q{This is a Ruby based DSL for writing JMeter test plans}
12
- gem.summary = %q{This is a Ruby based DSL for writing JMeter test plans}
11
+ gem.description = %q{Ruby based DSL for writing JMeter test plans}
12
+ gem.summary = %q{Ruby based DSL for writing JMeter test plans}
13
13
  gem.homepage = "http://flood-io.github.io/ruby-jmeter/"
14
14
  gem.add_dependency("rest-client")
15
15
  gem.add_dependency("nokogiri")
16
16
  gem.add_runtime_dependency('json-jruby') if RUBY_PLATFORM == 'java'
17
17
 
18
18
  gem.files = `git ls-files`.split($/)
19
- gem.executables << 'grid'
19
+ gem.executables << 'flood'
20
20
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
21
  gem.require_paths = ['lib']
22
22
 
data/spec/dsl_spec.rb CHANGED
@@ -636,6 +636,22 @@ describe "DSL" do
636
636
  end
637
637
 
638
638
 
639
+ describe 'json extract' do
640
+ let(:doc) do
641
+ test do
642
+ extract json: '.test.path', name: 'my_json'
643
+ end.to_doc
644
+ end
645
+
646
+ let(:fragment) { doc.search("//com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor").first }
647
+
648
+ it 'should match on json path and var' do
649
+ fragment.search(".//stringProp[@name='JSONPATH']").text.should == '.test.path'
650
+ fragment.search(".//stringProp[@name='VAR']").text.should == 'my_json'
651
+ end
652
+ end
653
+
654
+
639
655
  describe 'testdata extract' do
640
656
  let(:doc) do
641
657
  test do
metadata CHANGED
@@ -1,61 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.9
4
+ version: 2.11.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-15 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: This is a Ruby based DSL for writing JMeter test plans
41
+ description: Ruby based DSL for writing JMeter test plans
42
42
  email:
43
43
  - support@flood.io
44
44
  executables:
45
- - grid
45
+ - flood
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - .gitattributes
50
- - .gitignore
51
- - .rspec
52
- - .ruby-version
49
+ - ".gitattributes"
50
+ - ".gitignore"
51
+ - ".rspec"
52
+ - ".ruby-version"
53
53
  - CHANGES.md
54
54
  - Gemfile
55
55
  - LICENSE.txt
56
56
  - README.md
57
57
  - Rakefile
58
- - bin/grid
58
+ - bin/flood
59
59
  - examples/basic_assertion.rb
60
60
  - examples/basic_auth.rb
61
61
  - examples/basic_cache.rb
@@ -72,6 +72,7 @@ files:
72
72
  - examples/basic_header.rb
73
73
  - examples/basic_http_request_defaults.rb
74
74
  - examples/basic_http_request_with_files.rb
75
+ - examples/basic_json_path_extractor.rb
75
76
  - examples/basic_ldap_ext.rb
76
77
  - examples/basic_meta_fu.rb
77
78
  - examples/basic_post.rb
@@ -216,15 +217,16 @@ files:
216
217
  - lib/ruby-jmeter/helpers/user-agents.rb
217
218
  - lib/ruby-jmeter/idl.rb
218
219
  - lib/ruby-jmeter/idl.xml
219
- - lib/ruby-jmeter/plugins/gc_console_status_logger.rb
220
- - lib/ruby-jmeter/plugins/gc_dummy_sampler.rb
221
- - lib/ruby-jmeter/plugins/gc_latencies_over_time.rb
222
- - lib/ruby-jmeter/plugins/gc_response_codes_per_second.rb
223
- - lib/ruby-jmeter/plugins/gc_response_times_distribution.rb
224
- - lib/ruby-jmeter/plugins/gc_response_times_over_time.rb
225
- - lib/ruby-jmeter/plugins/gc_response_times_percentiles.rb
226
- - lib/ruby-jmeter/plugins/gc_transactions_per_second.rb
227
- - lib/ruby-jmeter/plugins/gc_variable_throughput_timer.rb
220
+ - lib/ruby-jmeter/plugins/console_status_logger.rb
221
+ - lib/ruby-jmeter/plugins/dummy_sampler.rb
222
+ - lib/ruby-jmeter/plugins/json_path_extractor.rb
223
+ - lib/ruby-jmeter/plugins/latencies_over_time.rb
224
+ - lib/ruby-jmeter/plugins/response_codes_per_second.rb
225
+ - lib/ruby-jmeter/plugins/response_times_distribution.rb
226
+ - lib/ruby-jmeter/plugins/response_times_over_time.rb
227
+ - lib/ruby-jmeter/plugins/response_times_percentiles.rb
228
+ - lib/ruby-jmeter/plugins/transactions_per_second.rb
229
+ - lib/ruby-jmeter/plugins/variable_throughput_timer.rb
228
230
  - lib/ruby-jmeter/version.rb
229
231
  - ruby-jmeter.gemspec
230
232
  - spec/dsl_spec.rb
@@ -240,20 +242,20 @@ require_paths:
240
242
  - lib
241
243
  required_ruby_version: !ruby/object:Gem::Requirement
242
244
  requirements:
243
- - - '>='
245
+ - - ">="
244
246
  - !ruby/object:Gem::Version
245
247
  version: '0'
246
248
  required_rubygems_version: !ruby/object:Gem::Requirement
247
249
  requirements:
248
- - - '>='
250
+ - - ">="
249
251
  - !ruby/object:Gem::Version
250
252
  version: '0'
251
253
  requirements: []
252
254
  rubyforge_project:
253
- rubygems_version: 2.0.14
255
+ rubygems_version: 2.2.2
254
256
  signing_key:
255
257
  specification_version: 4
256
- summary: This is a Ruby based DSL for writing JMeter test plans
258
+ summary: Ruby based DSL for writing JMeter test plans
257
259
  test_files:
258
260
  - spec/dsl_spec.rb
259
261
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCConsoleStatusLogger
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.reporters.ConsoleStatusLogger guiclass="kg.apc.jmeter.reporters.ConsoleStatusLoggerGui" testclass="kg.apc.jmeter.reporters.ConsoleStatusLogger" testname="#{name}" enabled="true"/>
9
- EOF
10
- update params
11
- end
12
- end
13
-
14
- end
@@ -1,23 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCDummySampler
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.samplers.DummySampler guiclass="kg.apc.jmeter.samplers.DummySamplerGui" testclass="kg.apc.jmeter.samplers.DummySampler" testname="jp@gc - Dummy Sampler" enabled="true">
9
- <boolProp name="WAITING">true</boolProp>
10
- <boolProp name="SUCCESFULL">true</boolProp>
11
- <stringProp name="RESPONSE_CODE">200</stringProp>
12
- <stringProp name="RESPONSE_MESSAGE">OK</stringProp>
13
- <stringProp name="REQUEST_DATA"></stringProp>
14
- <stringProp name="RESPONSE_DATA"></stringProp>
15
- <stringProp name="RESPONSE_TIME">0</stringProp>
16
- <stringProp name="LATENCY">0</stringProp>
17
- </kg.apc.jmeter.samplers.DummySampler>
18
- EOF
19
- update params
20
- end
21
- end
22
-
23
- end
@@ -1,48 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCLatenciesOverTime
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.LatenciesOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">500</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
-
48
- end
@@ -1,48 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCResponseCodesPerSecond
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseCodesPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">1000</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
-
48
- end
@@ -1,47 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCResponseTimesDistribution
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesDistributionGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">100</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
- end
@@ -1,48 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCResponseTimesOverTime
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesOverTimeGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">500</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
-
48
- end
@@ -1,48 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCResponseTimesPercentiles
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.ResponseTimesPercentilesGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">500</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
-
48
- end
@@ -1,48 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCTransactionsPerSecond
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.vizualizers.CorrectedResultCollector guiclass="kg.apc.jmeter.vizualizers.TransactionsPerSecondGui" testclass="kg.apc.jmeter.vizualizers.CorrectedResultCollector" testname="#{name}" enabled="#{enabled(params)}">
9
- <boolProp name="ResultCollector.error_logging">false</boolProp>
10
- <objProp>
11
- <name>saveConfig</name>
12
- <value class="SampleSaveConfiguration">
13
- <time>true</time>
14
- <latency>true</latency>
15
- <timestamp>true</timestamp>
16
- <success>true</success>
17
- <label>true</label>
18
- <code>true</code>
19
- <message>true</message>
20
- <threadName>true</threadName>
21
- <dataType>true</dataType>
22
- <encoding>false</encoding>
23
- <assertions>true</assertions>
24
- <subresults>true</subresults>
25
- <responseData>false</responseData>
26
- <samplerData>false</samplerData>
27
- <xml>true</xml>
28
- <fieldNames>false</fieldNames>
29
- <responseHeaders>false</responseHeaders>
30
- <requestHeaders>false</requestHeaders>
31
- <responseDataOnError>false</responseDataOnError>
32
- <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
33
- <assertionsResultsToSave>0</assertionsResultsToSave>
34
- <bytes>true</bytes>
35
- </value>
36
- </objProp>
37
- <stringProp name="filename"></stringProp>
38
- <longProp name="interval_grouping">1000</longProp>
39
- <boolProp name="graph_aggregated">false</boolProp>
40
- <stringProp name="include_sample_labels"></stringProp>
41
- <stringProp name="exclude_sample_labels"></stringProp>
42
- </kg.apc.jmeter.vizualizers.CorrectedResultCollector>
43
- EOF
44
- update params
45
- end
46
- end
47
-
48
- end
@@ -1,26 +0,0 @@
1
- module RubyJmeter
2
-
3
- class GCThroughputShapingTimer
4
- attr_accessor :doc
5
- include Helper
6
- def initialize(name, steps, params={})
7
- @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
8
- <kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="#{name}" enabled="true">
9
- <collectionProp name="load_profile"/>
10
- </kg.apc.jmeter.timers.VariableThroughputTimer>
11
- EOF
12
- steps.each_with_index do |step, index|
13
- @doc.at_xpath('//collectionProp') <<
14
- Nokogiri::XML(<<-EOF.strip_heredoc).children
15
- <collectionProp name="step_#{index}">
16
- <stringProp name="start_rps_#{index}">#{step[:start_rps]}</stringProp>
17
- <stringProp name="end_rps_#{index}">#{step[:end_rps]}</stringProp>
18
- <stringProp name="duration_sec_#{index}">#{step[:duration]}</stringProp>
19
- </collectionProp>
20
- EOF
21
- end
22
- update params
23
- end
24
- end
25
-
26
- end