Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Steven Gueguen
slapos
Commits
e63fa766
Commit
e63fa766
authored
Apr 02, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jmeter: export graph and csv file
parent
17593b95
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
207 additions
and
10 deletions
+207
-10
software/jmeter-testNode/instance-jmeter.cfg.in
software/jmeter-testNode/instance-jmeter.cfg.in
+6
-2
software/jmeter-testNode/jmeter.sh.in
software/jmeter-testNode/jmeter.sh.in
+30
-2
software/jmeter-testNode/nginx_conf.in
software/jmeter-testNode/nginx_conf.in
+8
-0
software/jmeter-testNode/software.cfg
software/jmeter-testNode/software.cfg
+140
-6
software/jmeter-testNode/templates/user.properties
software/jmeter-testNode/templates/user.properties
+23
-0
No files found.
software/jmeter-testNode/instance-jmeter.cfg.in
View file @
e63fa766
...
@@ -62,6 +62,7 @@ recipe = slapos.cookbook:symbolic.link
...
@@ -62,6 +62,7 @@ recipe = slapos.cookbook:symbolic.link
target-directory = $${rootdirectory:jmeter}
target-directory = $${rootdirectory:jmeter}
link-binary =
link-binary =
${jmeter:location}/bin
${jmeter:location}/bin
${jmeter:location}/lib
[jmeter-job]
[jmeter-job]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
...
@@ -70,11 +71,12 @@ url = ${jmeter-script:location}/${jmeter-script:filename}
...
@@ -70,11 +71,12 @@ url = ${jmeter-script:location}/${jmeter-script:filename}
output = $${basedirectory:services}/jmeter
output = $${basedirectory:services}/jmeter
mode = 0700
mode = 0700
command-line = java -jar $${rootdirectory:jmeter}/bin/ApacheJMeter.jar -j $${basedirectory:log}/jmeter.log -l $${basedirectory:log}/result.jtl -d $${rootdirectory:jmeter} -n
env-path = ${java:location}/bin:$${rootdirectory:jmeter}/bin
env-path = ${java:location}/bin:$${rootdirectory:jmeter}/bin
jmx-url = $${slap-parameter:jmx-url}
jmx-url = $${slap-parameter:jmx-url}
jmeter-dir = $${rootdirectory:jmeter}
jmeter-dir = $${rootdirectory:jmeter}
jmeter-options = $${slap-parameter:jmeter-options}
jmeter-options = $${slap-parameter:jmeter-options}
log-dir = $${basedirectory:log}
custom-cmd = $${slap-parameter:custom-graph-cmd}
[shell]
[shell]
recipe = slapos.cookbook:shell
recipe = slapos.cookbook:shell
...
@@ -131,6 +133,7 @@ path_nginx_conf = $${rootdirectory:etc}/nginx.conf
...
@@ -131,6 +133,7 @@ path_nginx_conf = $${rootdirectory:etc}/nginx.conf
# Executables
# Executables
bin_nginx = ${nginx:location}/sbin/nginx
bin_nginx = ${nginx:location}/sbin/nginx
bin_launcher = $${rootdirectory:bin}/nginx_launch
bin_launcher = $${rootdirectory:bin}/nginx_launch
mime_types = ${nginx:location}/conf/mime.types
# Utils
# Utils
path_shell = ${dash:location}/bin/dash
path_shell = ${dash:location}/bin/dash
# Misc.
# Misc.
...
@@ -211,7 +214,8 @@ shell-password = $${slap-parameter:shell-password}
...
@@ -211,7 +214,8 @@ shell-password = $${slap-parameter:shell-password}
[slap-parameter]
[slap-parameter]
shell-password = slapos
shell-password = slapos
jmx-url = http://jmeter
.apache.org/demos/LoopTestPlan
.jmx
jmx-url = http://jmeter
-plugins.org/img/examples/ActiveThreadsOverTimeExample
.jmx
jmeter-options =
jmeter-options =
custom-graph-cmd =
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
frontend-domain =
frontend-domain =
software/jmeter-testNode/jmeter.sh.in
View file @
e63fa766
...
@@ -2,11 +2,39 @@
...
@@ -2,11 +2,39 @@
export
PATH
=
${
:env-path
}
:
$PATH
export
PATH
=
${
:env-path
}
:
$PATH
JMX_FILE
=
"
${
:jmx-url
}
"
JMX_FILE
=
"
${
:jmx-url
}
"
JMETER_DIR
=
"
${
:jmeter-dir
}
"
JMETER_LOGDIR
=
"
${
:log-dir
}
"
CUSTOM_CMD
=
"
${
:custom-cmd
}
"
if
[
-z
"
$JMX_FILE
"
]
;
then
if
[
-z
"
$JMX_FILE
"
]
;
then
echo
"NO Jmeter JOB"
;
echo
"NO Jmeter JOB"
;
else
else
wget
-O
${
:jmeter-dir
}
/jmeter-task.jmx
$JMX_FILE
;
wget
-O
${
:jmeter-dir
}
/jmeter-task.jmx
$JMX_FILE
;
${
:command-line
}
--testfile
${
:jmeter-dir
}
/jmeter-task.jmx
${
:jmeter-options
}
;
rm
-f
$JMETER_LOGDIR
/result.jtl
fi
#Run Jmeter task
java
-jar
$JMETER_DIR
/bin/ApacheJMeter.jar
-j
$JMETER_LOGDIR
/jmeter.log
\
-l
$JMETER_LOGDIR
/result.jtl
-d
$JMETER_DIR
-n
--testfile
$JMETER_DIR
/jmeter-task.jmx
${
:jmeter-options
}
;
#Draw image and export data into csv format
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/ResponseTimesOverTime.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
ResponseTimesOverTime
--width
800
--height
600
;
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/LatenciesOverTime.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
LatenciesOverTime
--width
800
--height
600
;
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/BytesThroughputOverTime.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
BytesThroughputOverTime
--width
800
--height
600
;
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/ThreadsStateOverTime.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
ThreadsStateOverTime
--width
800
--height
600
;
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/ResponseTimesDistribution.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
ResponseTimesDistribution
--width
800
--height
600
;
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-csv
$JMETER_LOGDIR
/AggregateReport.csv
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
--plugin-type
AggregateReport
;
#custom graph export command
if
[
-n
"
$CUSTOM_CMD
"
]
;
then
java
-jar
$JMETER_DIR
/lib/ext/CMDRunner.jar
--tool
Reporter
--generate-png
$JMETER_LOGDIR
/UserCustomGraph.png
\
--input-jtl
$JMETER_LOGDIR
/result.jtl
$CUSTOM_CMD
;
fi
fi
#PageDataExtractorOverTime
#ThreadsStateOverTime
#--extractor-regexps "(serv.*)={;}serv.*=(.*)"
\ No newline at end of file
software/jmeter-testNode/nginx_conf.in
View file @
e63fa766
...
@@ -46,7 +46,15 @@ http {
...
@@ -46,7 +46,15 @@ http {
location /result/ {
location /result/ {
alias {{ param_nginx['result_dir'] }};
alias {{ param_nginx['result_dir'] }};
autoindex on;
autoindex on;
include {{ param_nginx['mime_types'] }};
default_type application/octet-stream;
sendfile on;
autoindex_exact_size off;
autoindex_exact_size off;
autoindex_localtime on;
types {
text/plain log;
text/csv csv;
}
}
}
}
}
}
}
\ No newline at end of file
software/jmeter-testNode/software.cfg
View file @
e63fa766
...
@@ -7,6 +7,7 @@ parts =
...
@@ -7,6 +7,7 @@ parts =
jmeter
jmeter
template
template
instance-jmeter
instance-jmeter
install-plugins
extends =
extends =
../../stack/slapos.cfg
../../stack/slapos.cfg
...
@@ -31,14 +32,14 @@ eggs =
...
@@ -31,14 +32,14 @@ eggs =
# Default template for the instance.
# Default template for the instance.
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/instance.cfg
#md5sum = 3e1ea477d48080e9bdb98579f7f28be
6
md5sum = 14095c1d35a9c4a8c4f47518958f230
6
output = ${buildout:directory}/template.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
mode = 0644
[instance-jmeter]
[instance-jmeter]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-jmeter.cfg.in
url = ${:_profile_base_location_}/instance-jmeter.cfg.in
#md5sum = d160bb15d8d3a3913706a4ed29c49388
md5sum = 0cd9190023fbd7d077e6d3ea51dd8dfe
output = ${buildout:directory}/template-jmeter.cfg
output = ${buildout:directory}/template-jmeter.cfg
mode = 0644
mode = 0644
...
@@ -48,19 +49,19 @@ url = ${:_profile_base_location_}/${:filename}
...
@@ -48,19 +49,19 @@ url = ${:_profile_base_location_}/${:filename}
mode = 0644
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = jmeter.sh.in
filename = jmeter.sh.in
#md5sum = d160bb15d8d3a3913706a4ed29c49388
md5sum = 1c08a7ce7fb031ecc3f1869a2abfff6e
[template-nginx-conf]
[template-nginx-conf]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/nginx_conf.in
url = ${:_profile_base_location_}/nginx_conf.in
#md5sum = fa66988e96bb712c0580b5fb90f95700
md5sum = 9d9addae6483259cdd741cec9e46c61c
filename = nginx_conf.in
filename = nginx_conf.in
mode = 0644
mode = 0644
[template-nginx]
[template-nginx]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/nginx.sh.in
url = ${:_profile_base_location_}/nginx.sh.in
#md5sum = c7f8b6e9ae84aa94686a9cbaaa3dd69
3
md5sum = 735d500252e09ae2e2c2b7b0845982a
3
filename = nginx.sh.in
filename = nginx.sh.in
mode = 0644
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
...
@@ -75,6 +76,66 @@ url = http://mirror.reverse.net/pub/apache//jmeter/binaries/apache-jmeter-2.11.t
...
@@ -75,6 +76,66 @@ url = http://mirror.reverse.net/pub/apache//jmeter/binaries/apache-jmeter-2.11.t
md5sum = f3f853c8f79734580a199efd7a2f0a11
md5sum = f3f853c8f79734580a199efd7a2f0a11
strip-top-level-dir = true
strip-top-level-dir = true
[jmeter-plugin-standard]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.1.3.zip
md5sum = 525ec15732c12b21f8a7a2bb23c6b3cf
[jmeter-plugin-serverAgent]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/ServerAgent-2.2.1.zip
md5sum = 48e6bd68a1a3bf28b56708713f8b32eb
[jmeter-plugin-extrasLibs]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/JMeterPlugins-ExtrasLibs-1.1.3.zip
md5sum = a9036251ed15744f688849562d50a77f
[jmeter-plugin-extras]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/JMeterPlugins-Extras-1.1.3.zip
md5sum = aa8e14e713c408f5237c4e2c041523b7
[jmeter-plugin-webDriver]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/JMeterPlugins-WebDriver-1.1.3.zip
md5sum = 24a5796ee0114d005c8a0b75945301e3
[jmeter-plugin-hadoop]
recipe = hexagonit.recipe.download
url = http://jmeter-plugins.org/downloads/file/JMeterPlugins-Hadoop-1.1.2.zip
md5sum = 0ab720e9c0852ef5fe1f6b347c4d2ec6
[jmeter-config]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/user.properties
md5sum = cea89660608626a471920fca5de25286
filename = user.properties
mode = 0644
[install-plugins]
recipe = plone.recipe.command
location = ${jmeter:location}
stop-on-error = true
command =
cp -n ${:location}/bin/jmeter.properties ${:location}/bin/jmeter.old.properties
cp -nr ${jmeter-plugin-standard:location}/lib/* ${:location}/lib/ && \
cp -nr ${jmeter-plugin-serverAgent:location}/lib/* ${:location}/lib/ && \
cp -nr ${jmeter-plugin-extrasLibs:location}/lib/* ${:location}/lib/ && \
cp -nr ${jmeter-plugin-extras:location}/lib/* ${:location}/lib/ && \
cp -nr ${jmeter-plugin-webDriver:location}/lib/* ${:location}/lib/ && \
cp -nr ${jmeter-plugin-hadoop:location}/lib/* ${:location}/lib/ && \
cp -f ${jmeter-config:location}/${jmeter-config:filename} ${:location}/bin/ && \
sed -e 's/#jmeter.save.saveservice.thread_counts=.*/jmeter.save.saveservice.thread_counts=true/' \
-e 's/#jmeter.save.saveservice.response_data=.*/jmeter.save.saveservice.response_data=true/' \
${:location}/bin/jmeter.old.properties > ${:location}/bin/jmeter.properties && \
cd ${jmeter-plugin-serverAgent:location}/ && \
cp -n ServerAgent.jar CMDRunner.jar startAgent.sh startAgent.bat ${:location}/bin/
update-command = ${:command}
# -e 's/#jmeter.save.saveservice.output_format=.*/jmeter.save.saveservice.output_format=csv/' \
# -e 's/#jmeter.save.saveservice.assertion_results_failure_message=.*/jmeter.save.saveservice.assertion_results_failure_message=true/' \
[networkcache]
[networkcache]
# signature certificates of the following uploaders.
# signature certificates of the following uploaders.
# Romain Courteaud
# Romain Courteaud
...
@@ -192,4 +253,77 @@ signature-certificate-list =
...
@@ -192,4 +253,77 @@ signature-certificate-list =
-----END CERTIFICATE-----
-----END CERTIFICATE-----
[versions]
[versions]
Jinja2 = 2.7.2
MarkupSafe = 0.19
Werkzeug = 0.9.4
buildout-versions = 1.7
cffi = 0.8.2
cmd2 = 0.6.7
collective.recipe.environment = 0.2.0
cryptography = 0.3
itsdangerous = 0.24
lxml = 3.3.3
meld3 = 0.6.10
plone.recipe.command = 1.1
pyOpenSSL = 0.14
pyparsing = 2.0.1
six = 1.6.1
slapos.cookbook = 0.85
slapos.recipe.build = 0.12
slapos.recipe.cmmi = 0.2
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.5
stevedore = 0.15
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==1.0.3
Flask = 0.10.1
# Required by:
# slapos.core==1.0.3
cliff = 1.6.0
# Required by:
# slapos.cookbook==0.85
inotifyx = 0.2.0-1
# Required by:
# slapos.cookbook==0.85
lock-file = 2.0
# Required by:
# slapos.cookbook==0.85
netaddr = 0.7.11
# Required by:
# slapos.core==1.0.3
netifaces = 0.8-1
# Required by:
# cffi==0.8.2
pycparser = 2.10
# Required by:
# slapos.cookbook==0.85
pytz = 2014.2
# Required by:
# slapos.core==1.0.3
requests = 2.2.1
# Required by:
# slapos.cookbook==0.85
slapos.core = 1.0.3
# Required by:
# slapos.core==1.0.3
supervisor = 3.0
# Required by:
# slapos.cookbook==0.85
xml-marshaller = 0.9.7
# Required by:
# slapos.core==1.0.3
zope.interface = 4.1.1
software/jmeter-testNode/templates/user.properties
0 → 100644
View file @
e63fa766
#---------------------------------------------------------------------------
# JMeter Plugins config (jmeter-plugins.org)
#---------------------------------------------------------------------------
# Enable or disable the gradient paint for graphs. Value is true or false, default is true.
jmeterPlugin.drawGradient
=
true
# Globaly disable final zeroing lines in all graphs. Value is true or false, default is false.
jmeterPlugin.neverDrawFinalZeroingLines
=
true
# Globaly disable current X lines drawing in all concerned graphs. Value is true or false, default is false.
jmeterPlugin.neverDrawCurrentX
=
true
# Enable or disable graphs Y Axis scaling for better readability. Value is true or false, default is true.
jmeterPlugin.optimizeYAxis
=
true
# Use relative time in time based graphs. Value is true or false, default is true.
jmeterPlugin.useRelativeTime
=
true
# Force csv separator character. Default is ',' if decimal separator is '.', ';' otherwise
#jmeterPlugin.csvSeparator=;
# Force csv time format (see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)
#jmeterPlugin.csvTimeFormat=HH:mm:ss
# Prefix or not plugin items in JMeter menus. Value is true or false, default is true.
jmeterPlugin.prefixPlugins
=
true
# Force line width for all line graphs. Default is '1.0'.
jmeterPlugin.graphLineWidth
=
3
# Draw markers in relevent line graphs. Default is true.
meterPlugin.drawLineMarker
=
false
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment