gridinit-jmeter 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 1.9.3-p194
1
+ 1.9.3-p385
data/bin/grid CHANGED
File without changes
@@ -100,6 +100,7 @@ require 'gridinit-jmeter/helpers/user-agents'
100
100
  require 'gridinit-jmeter/controllers/once_only'
101
101
  require 'gridinit-jmeter/controllers/if_controller'
102
102
  require 'gridinit-jmeter/controllers/loop_controller'
103
+ require 'gridinit-jmeter/controllers/throughput'
103
104
 
104
105
  # SAMPLERS
105
106
  require 'gridinit-jmeter/samplers/http_sampler'
@@ -0,0 +1,26 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class Throughput
5
+ attr_accessor :doc
6
+ include Helper
7
+ def initialize(name, percent, params={})
8
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
+ <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="#{percent.to_i}%_#{name}" enabled="true">
10
+ <intProp name="ThroughputController.style">1</intProp>
11
+ <boolProp name="ThroughputController.perThread">false</boolProp>
12
+ <intProp name="ThroughputController.maxThroughput">1</intProp>
13
+ <FloatProperty>
14
+ <name>ThroughputController.percentThroughput</name>
15
+ <value>#{percent.to_f}</value>
16
+ <savedValue>0.0</savedValue>
17
+ </FloatProperty>
18
+ </ThroughputController>
19
+ EOF
20
+ update params
21
+ end
22
+ end
23
+
24
+ end
25
+ end
26
+
@@ -8,6 +8,7 @@ module Gridinit
8
8
  @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
9
  <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="#{name}" enabled="true">
10
10
  <boolProp name="TransactionController.parent">true</boolProp>
11
+ <boolProp name="TransactionController.includeTimers">false</boolProp>
11
12
  </TransactionController>
12
13
  EOF
13
14
  update params
@@ -113,6 +113,12 @@ module Gridinit
113
113
  self.instance_exec(&block) if block
114
114
  end
115
115
 
116
+ def throughput(name="throughput", percent=100.0, params={}, &block)
117
+ node = Gridinit::Jmeter::Throughput.new(name, percent, params)
118
+ attach_to_last(node, caller)
119
+ self.instance_exec(&block) if block
120
+ end
121
+
116
122
  def If(name="If Controller", params={}, &block)
117
123
  node = Gridinit::Jmeter::IfController.new(name, params)
118
124
  attach_to_last(node, caller)
@@ -323,6 +329,8 @@ module Gridinit
323
329
  '//ThreadGroup/following-sibling::hashTree'
324
330
  when 'transaction'
325
331
  '//TransactionController/following-sibling::hashTree'
332
+ when 'throughput'
333
+ '//ThroughputController/following-sibling::hashTree'
326
334
  when 'once'
327
335
  '//OnceOnlyController/following-sibling::hashTree'
328
336
  when 'exists'
@@ -13,6 +13,7 @@ module Gridinit
13
13
  <stringProp name="RegexExtractor.template">$1$</stringProp>
14
14
  <stringProp name="RegexExtractor.default"></stringProp>
15
15
  <stringProp name="RegexExtractor.match_number">0</stringProp>
16
+ <stringProp name="Sample.scope">all</stringProp>
16
17
  </RegexExtractor>
17
18
  EOF
18
19
  update params
@@ -32,10 +32,15 @@ module Gridinit
32
32
  parse_url(url, params) unless url.empty?
33
33
  fill_in(params) if params[:fill_in]
34
34
  raw_body(params) if params[:raw_body]
35
- params[:params] && params[:params].split('&').each do |param|
36
- name,value = param.split('=')
37
- fill_in({ :fill_in => { "#{name}" => value }, :always_encode => params[:always_encode] })
35
+ if params[:raw_path]
36
+ params[:path] = url
37
+ else
38
+ params[:params] && params[:params].split('&').each do |param|
39
+ name,value = param.split('=')
40
+ fill_in({ :fill_in => { "#{name}" => value }, :always_encode => params[:always_encode] })
41
+ end
38
42
  end
43
+
39
44
  update params
40
45
  end
41
46
 
@@ -1,5 +1,5 @@
1
1
  module Gridinit
2
2
  module Jmeter
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridinit-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -96,6 +96,7 @@ files:
96
96
  - lib/gridinit-jmeter/controllers/if_controller.rb
97
97
  - lib/gridinit-jmeter/controllers/loop_controller.rb
98
98
  - lib/gridinit-jmeter/controllers/once_only.rb
99
+ - lib/gridinit-jmeter/controllers/throughput.rb
99
100
  - lib/gridinit-jmeter/controllers/transaction.rb
100
101
  - lib/gridinit-jmeter/dsl.rb
101
102
  - lib/gridinit-jmeter/helpers/dsl_helper.rb
@@ -155,4 +156,3 @@ test_files:
155
156
  - spec/dsl_spec.rb
156
157
  - spec/spec_helper.rb
157
158
  - spec/stub.rb
158
- has_rdoc: