diff --git a/acmeair-jmeter/README.md b/acmeair-jmeter/README.md index 3a902b9..1a7373e 100644 --- a/acmeair-jmeter/README.md +++ b/acmeair-jmeter/README.md @@ -42,8 +42,9 @@ Also needed is the json-simple library to jmeter's ext directory. ```text cd acmeair-jmeter/scripts/ ``` -Edit the host.csv file to be the appropriate name or address for the WebSphere Liberty server. -The workload can be started using either the command line or JMeter's graphical interface. +To specify the address of the server, specify `-JHOSTNAME= -JPORT=` on the JMeter command line to match the address of your WebSphere Liberty server. Alternatively, edit the `user.properties` file, changing `HOSTNAME` and `PORT`, and supply this file to JMeter with `-q user.properties`. + +The workload can be executed using either the command line or JMeter's graphical interface. To run the workload using the command line, some additional steps are needed to configure what will be collected in the output. Edit the %JMETER_DIR%/bin/jmeter.properties file setting the summariser properties to get basic output reporting. @@ -57,7 +58,7 @@ summariser.name=summary summariser.interval=30 summariser.log=true ``` -Setting these properties will allow summary statistics to be printed on the console screen, as well as in the specified log file. +Setting these properties will allow summary statistics to be printed on the console screen, as well as in the specified log file. Alternatively, use the provided `user.properties` file which already enables the summarizer. In addition to the data collected to the log file. JMeter can also collect the sampler result data of individual requests. What data is collected in this JTL file is fully configurable within the jmeter.properties file, and a basic set of data collection is enabled in JMeter by default. Adding too many metrics to be collected can add additional overhead to the workload process. @@ -66,7 +67,7 @@ The default format of the JTL file output is csv. if desired, this can be switch jmeter.save.saveservice.output_format=xml ``` -In addition to the standard metrics that are available within JMeter, the AcmeAir.jmx test plan also has some additional metrics available. These custom metrics can be printed in the JTL output file by adding the sample_variables property to the %JMETER_DIR%/bin/user.properties file. +In addition to the standard metrics that are available within JMeter, the AcmeAir.jmx test plan also has some additional metrics available. These custom metrics can be printed in the JTL output file by adding the sample_variables property to the %JMETER_DIR%/bin/user.properties file. This is already present in the provided `user.properties` file. ```text sample_variables=FLIGHTTOCOUNT,FLIGHTRETCOUNT,ONEWAY ``` @@ -107,70 +108,28 @@ Alternatively, the workload can also be ran from the command line if desired. The most common syntax for running the workload from the command line would be: ```text -%JMETER_DIR%/bin/jmeter -n -t AcmeAir.jmx -j AcmeAir1.log -l AcmeAir1.jtl +%JMETER_DIR%/bin/jmeter -n -t AcmeAir.jmx -j AcmeAir1.log -l AcmeAir1.jtl -q user.properties ``` * **-n** This specifies JMeter is to run in non-gui mode * **-t** The name of the JMeter test plan. * **-j** The name of the output log file. * **-l** The name of the output file to collect JMeter sampler results. - +* **-q** The name of the JMeter user.properties file. ## Instructions to run the workload for the NodeJS implementation In order to run the JMeter workload script with the NodeJS implementation of Acme Air, there are a couple of minor changes necessary. -*1*.) Change the CONTEXT_ROOT user defined variable from /acmeair-webapp to an empty value. - -```text - - - - CONTEXT_ROOT - /acmeair-webapp - prepended to all http urls - = - - - -``` -In the above stanza *Argument.value* should be changed to: +*1*.) Change the CONTEXT_ROOT user defined variable from /acmeair-webapp to an empty value either by passing `-JCONTEXT_ROOT=` on the command line, or in `user.properties`: ```text - +CONTEXT_ROOT= ``` - - -*2*.) Change the port from 9080 to 3000 - -```text - - - - - ${WLP_HOSTS} - 9080 - - - - - /acmeair-webapp - 4 - - -``` -The HTTPSampler.port property should be changed to be 3000 (or whichever port the target server is listening on). - -```text -3000 -``` - - -*3*.) When running the jmeter command add a Java systems property to the command line: +*2*.) When running the jmeter command, either add a Java systems property to the command line: ```text %JMETER_DIR%/bin/jmeter -DusePureIDs=true -n -t AcmeAir.jmx -j AcmeAir1.log -l AcmeAir1.jtl ``` - - +Or use the provided system.properties file by specifying `-S system.properties` on the JMeter command line. diff --git a/acmeair-jmeter/scripts/AcmeAir.jmx b/acmeair-jmeter/scripts/AcmeAir.jmx index 4768fb3..6e0e544 100644 --- a/acmeair-jmeter/scripts/AcmeAir.jmx +++ b/acmeair-jmeter/scripts/AcmeAir.jmx @@ -33,32 +33,21 @@ false -1 - 1 - 30 + ${__P(THREADS, 1)} + ${__P(RAMPUP, 30)} true - 600 - 10 + ${__P(DURATION, 600)} + ${__P(DELAY, 10)} 1370979917000 1370979917000 - - , - - hosts.csv - false - true - Current thread - false - WLP_HOSTS - - - ${WLP_HOSTS} - 9080 + ${__P(HOSTNAME, localhost)} + ${__P(PORT, 9080)} @@ -71,7 +60,7 @@ CONTEXT_ROOT - /acmeair-webapp + ${__P(CONTEXT_ROOT, /acmeair-webapp)} prepended to all http urls = diff --git a/acmeair-jmeter/scripts/hosts.csv b/acmeair-jmeter/scripts/hosts.csv deleted file mode 100644 index e56ea71..0000000 --- a/acmeair-jmeter/scripts/hosts.csv +++ /dev/null @@ -1 +0,0 @@ -127.0.0.1 \ No newline at end of file diff --git a/acmeair-jmeter/scripts/system.properties b/acmeair-jmeter/scripts/system.properties new file mode 100644 index 0000000..cac7966 --- /dev/null +++ b/acmeair-jmeter/scripts/system.properties @@ -0,0 +1,116 @@ +# Sample system.properties file +# +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +# Commons Logging properties +# Used by HttpComponents 4.x, see: +# http://hc.apache.org/httpcomponents-client-4.3.x/logging.html +# +# By default, Commons Logging is configured by JMeter to use the same logging system +# as the main JMeter code; to configure it please see jmeter.properties. +# +# Uncomment to enable debugging of Commons Logging setup; may be useful if +# implementation cannot be instantiated: +#org.apache.commons.logging.diagnostics.dest=STDERR +# +# Uncomment to enable Commons Logging to use standard output +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog +#org.apache.commons.logging.simplelog.showdatetime=true +# +# Uncomment the following two lines to generate basic debug logging for HC4.x +#org.apache.commons.logging.simplelog.log.org.apache.http=DEBUG +#org.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR + +# Java networking-related properties +# +# For details of Oracle Java network properties, see for example: +# http://download.oracle.com/javase/1.5.0/docs/guide/net/properties.html +# +#java.net.preferIPv4Stack=false +#java.net.preferIPv6Addresses=false +#networkaddress.cache.ttl=-1 +#networkaddress.cache.negative.ttl=10 + +# +# +# SSL properties (moved from jmeter.properties) +# +# See http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Customization +# for information on the javax.ssl system properties + +# Truststore properties (trusted certificates) +#javax.net.ssl.trustStore=/path/to/[jsse]cacerts +#javax.net.ssl.trustStorePassword +#javax.net.ssl.trustStoreProvider +#javax.net.ssl.trustStoreType [default = KeyStore.getDefaultType()] + +# Keystore properties (client certificates) +# Location +#javax.net.ssl.keyStore=.keystore +# +#The password to your keystore +#javax.net.ssl.keyStorePassword=changeit +# +#javax.net.ssl.keyStoreProvider +#javax.net.ssl.keyStoreType [default = KeyStore.getDefaultType()] + +# SSL debugging: +# See http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug +# +# javax.net.debug=help - generates the list below: +#all turn on all debugging +#ssl turn on ssl debugging +# +#The following can be used with ssl: +# record enable per-record tracing +# handshake print each handshake message +# keygen print key generation data +# session print session activity +# defaultctx print default SSL initialization +# sslctx print SSLContext tracing +# sessioncache print session cache tracing +# keymanager print key manager tracing +# trustmanager print trust manager tracing +# +# handshake debugging can be widened with: +# data hex dump of each handshake message +# verbose verbose handshake message printing +# +# record debugging can be widened with: +# plaintext hex dump of record plaintext +# +# Examples: +#javax.net.debug=ssl +#javax.net.debug=sslctx,session,sessioncache +# +# +# We enable the following property to allow headers such as "Host" to be passed through. +# See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6996110 +sun.net.http.allowRestrictedHeaders=true + +#Uncomment for Kerberos authentication and edit the 2 config files to match your domains +#With the following configuration krb5.conf and jaas.conf must be located in bin folder +#You can modify these file paths to use absolute location +#java.security.krb5.conf=krb5.conf +#java.security.auth.login.config=jaas.conf + +# Location of keytool application +# This property can be defined if JMeter cannot find the application automatically +# It should not be necessary in most cases. +#keytool.directory=/bin + +# Required for Node.js implementation of AcmeAir +usePureIDs=true diff --git a/acmeair-jmeter/scripts/user.properties b/acmeair-jmeter/scripts/user.properties new file mode 100644 index 0000000..00b1d34 --- /dev/null +++ b/acmeair-jmeter/scripts/user.properties @@ -0,0 +1,89 @@ +# Sample user.properties file +# +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +#--------------------------------------------------------------------------- +# Classpath configuration +#--------------------------------------------------------------------------- +# +# List of paths (separated by ;) to search for additional JMeter plugin classes, +# for example new GUI elements and samplers. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib/ext directory. +# Do not use this for utility ir plugin dependecy jars. +#search_paths=/app1/lib;/app2/lib + +# List of paths that JMeter will search for utility and plugin dependency classes. +# Use your platform path separator to separate multiple paths. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib directory. +# All entries will be added to the class path of the system class loader +# and also to the path of the JMeter internal loader. +# Paths with spaces may cause problems for the JVM +#user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar + +# List of paths (separated by ;) that JMeter will search for utility +# and plugin dependency classes. +# A path item can either be a jar file or a directory. +# Any jar file in such a directory will be automatically included, +# jar files in sub directories are ignored. +# The given value is in addition to any jars found in the lib directory +# or given by the user.classpath property. +# All entries will be added to the path of the JMeter internal loader only. +# For plugin dependencies using plugin_dependency_paths should be preferred over +# user.classpath. +#plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar + +#--------------------------------------------------------------------------- +# Logging configuration +#--------------------------------------------------------------------------- +#log_level.jorphan.reflect=DEBUG +# Warning: enabling the next debug line causes javax.net.ssl.SSLException: Received fatal alert: unexpected_message +# for certain sites when used with the default HTTP Sampler +#log_level.jmeter.util.HttpSSLProtocolSocketFactory=DEBUG +#log_level.jmeter.util.JsseSSLManager=DEBUG + +# Enable Proxy request debug +#log_level.jmeter.protocol.http.proxy.HttpRequestHdr=DEBUG + +#--------------------------------------------------------------------------- +# Summariser - Generate Summary Results - configuration (mainly applies to non-GUI mode) +#--------------------------------------------------------------------------- +# +summariser.name=summary +summariser.interval=30 +summariser.log=true +summariser.out=true + +# +# AcmeAir sample variables +# +sample_variables=FLIGHTTOCOUNT,FLIGHTRETCOUNT,ONEWAY + +# +# Tunables for AcmeAir.jmx +# +HOSTNAME=localhost +PORT=9080 +THREADS=1 +RAMPUP=30 +DURATION=600 +DELAY=10 +CONTEXT_ROOT=/acmeair-webapp