gridinit-jmeter 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/basic_simple_data_writer.rb +14 -0
- data/lib/gridinit-jmeter/dsl.rb +8 -0
- data/lib/gridinit-jmeter/listeners/gc_transactions_per_second.rb +0 -1
- data/lib/gridinit-jmeter/listeners/graph_visualizer.rb +0 -1
- data/lib/gridinit-jmeter/listeners/response_time_graph_visualizer.rb +0 -1
- data/lib/gridinit-jmeter/listeners/simple_data_writer.rb +48 -0
- data/lib/gridinit-jmeter/listeners/stat_visualizer.rb +0 -1
- data/lib/gridinit-jmeter/listeners/summary_report.rb +0 -1
- data/lib/gridinit-jmeter/version.rb +1 -1
- data/lib/gridinit-jmeter.rb +1 -0
- metadata +4 -2
@@ -0,0 +1,14 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'gridinit-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
threads 1 do
|
6
|
+
visit 'Google Search', 'http://google.com'
|
7
|
+
end
|
8
|
+
|
9
|
+
simple_data_writer 'errors', { filename: '/var/log/gridnode/stderr.log', error_logging: true }
|
10
|
+
|
11
|
+
# also aliased as log
|
12
|
+
log 'success', { filename: '/var/log/gridnode/successful.log' }
|
13
|
+
|
14
|
+
end.jmx
|
data/lib/gridinit-jmeter/dsl.rb
CHANGED
@@ -218,6 +218,14 @@ module Gridinit
|
|
218
218
|
self.instance_exec(&block) if block
|
219
219
|
end
|
220
220
|
|
221
|
+
def simple_data_writer(name="Simple Data Writer", params={}, &block)
|
222
|
+
node = Gridinit::Jmeter::SimpleDataWriter.new(name, params)
|
223
|
+
attach_to_last(node, caller)
|
224
|
+
self.instance_exec(&block) if block
|
225
|
+
end
|
226
|
+
|
227
|
+
alias_method :log, :simple_data_writer
|
228
|
+
|
221
229
|
def response_time_graph_visualizer(name="Reponse Time Graph", params={}, &block)
|
222
230
|
node = Gridinit::Jmeter::ResponseTimeGraphVisualizer.new(name, params)
|
223
231
|
attach_to_last(node, caller)
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Gridinit
|
2
|
+
module Jmeter
|
3
|
+
|
4
|
+
class SimpleDataWriter
|
5
|
+
attr_accessor :doc
|
6
|
+
include Helper
|
7
|
+
def initialize(name, params={})
|
8
|
+
@doc = Nokogiri::XML(<<-EOF.strip_heredoc)
|
9
|
+
<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="#{name}" enabled="true">
|
10
|
+
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
11
|
+
<objProp>
|
12
|
+
<name>saveConfig</name>
|
13
|
+
<value class="SampleSaveConfiguration">
|
14
|
+
<time>true</time>
|
15
|
+
<latency>true</latency>
|
16
|
+
<timestamp>true</timestamp>
|
17
|
+
<success>true</success>
|
18
|
+
<label>true</label>
|
19
|
+
<code>true</code>
|
20
|
+
<message>true</message>
|
21
|
+
<threadName>true</threadName>
|
22
|
+
<dataType>false</dataType>
|
23
|
+
<encoding>false</encoding>
|
24
|
+
<assertions>false</assertions>
|
25
|
+
<subresults>false</subresults>
|
26
|
+
<responseData>false</responseData>
|
27
|
+
<samplerData>false</samplerData>
|
28
|
+
<xml>true</xml>
|
29
|
+
<fieldNames>false</fieldNames>
|
30
|
+
<responseHeaders>true</responseHeaders>
|
31
|
+
<requestHeaders>false</requestHeaders>
|
32
|
+
<responseDataOnError>false</responseDataOnError>
|
33
|
+
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
34
|
+
<assertionsResultsToSave>0</assertionsResultsToSave>
|
35
|
+
<bytes>true</bytes>
|
36
|
+
<threadCounts>true</threadCounts>
|
37
|
+
<sampleCount>true</sampleCount>
|
38
|
+
</value>
|
39
|
+
</objProp>
|
40
|
+
<stringProp name="filename">/var/log/gridnode/stderr.log</stringProp>
|
41
|
+
</ResultCollector>
|
42
|
+
EOF
|
43
|
+
update params
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
data/lib/gridinit-jmeter.rb
CHANGED
@@ -87,6 +87,7 @@ require 'gridinit-jmeter/helpers/user-agents'
|
|
87
87
|
require 'gridinit-jmeter/listeners/graph_visualizer'
|
88
88
|
require 'gridinit-jmeter/listeners/response_time_graph_visualizer'
|
89
89
|
require 'gridinit-jmeter/listeners/stat_visualizer'
|
90
|
+
require 'gridinit-jmeter/listeners/simple_data_writer'
|
90
91
|
require 'gridinit-jmeter/listeners/summary_report'
|
91
92
|
require 'gridinit-jmeter/listeners/gc_latencies_over_time'
|
92
93
|
require 'gridinit-jmeter/listeners/gc_response_codes_per_second'
|
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.
|
4
|
+
version: 0.1.8
|
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-03-
|
12
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- examples/basic_query_params.rb
|
77
77
|
- examples/basic_results.rb
|
78
78
|
- examples/basic_run.rb
|
79
|
+
- examples/basic_simple_data_writer.rb
|
79
80
|
- examples/basic_stdout.rb
|
80
81
|
- examples/basic_test_data.rb
|
81
82
|
- examples/basic_testplan.jmx
|
@@ -112,6 +113,7 @@ files:
|
|
112
113
|
- lib/gridinit-jmeter/listeners/gc_transactions_per_second.rb
|
113
114
|
- lib/gridinit-jmeter/listeners/graph_visualizer.rb
|
114
115
|
- lib/gridinit-jmeter/listeners/response_time_graph_visualizer.rb
|
116
|
+
- lib/gridinit-jmeter/listeners/simple_data_writer.rb
|
115
117
|
- lib/gridinit-jmeter/listeners/stat_visualizer.rb
|
116
118
|
- lib/gridinit-jmeter/listeners/summary_report.rb
|
117
119
|
- lib/gridinit-jmeter/listeners/table_visualizer.rb
|