summaryrefslogtreecommitdiffstats
path: root/s3p/README.perf.md
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2018-11-07 17:59:37 +0800
committerLianhao Lu <lianhao.lu@intel.com>2018-11-09 08:52:35 +0800
commitc1647ba56080a79d149b2e9fd647bda4da39997e (patch)
treeb210de14bfc96f5d34a7c13e60841b1fa823245e /s3p/README.perf.md
parentde0e18b974cb40cbbfac1accdc7d4b460ccd4186 (diff)
Added JMeter scripts for perf test
Change-Id: I4286c6defdef331ee5c40399d17381d3c8b8a544 Issue-ID: POLICY-836 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 's3p/README.perf.md')
-rw-r--r--s3p/README.perf.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/s3p/README.perf.md b/s3p/README.perf.md
new file mode 100644
index 00000000..aaa9d47d
--- /dev/null
+++ b/s3p/README.perf.md
@@ -0,0 +1,55 @@
+# Performance Test for Policy Distribution
+## Steps to Run performance test
+1. Download Apache JMeter
+Download JMeter 5.0 from https://jmeter.apache.org/download_jmeter.cgi, and extracted it locally.
+
+2. Launch the policy distribution service
+Launch the policy distribution service with the configuration from s3pConfig.json, you need to make sure when the service is being launched, the directory configured in s3pConfig.json by receptionHandlerConfigurationParameters.fileConfiguration.parameters.watchPath is a valid local directory(Default directory is /tmp/policy_distribution/csar/).
+The policy distribution service will use the FileSystemReceptionHandler plugin to monitor the local directory specified by the 'watchPath' parameter for newly added csar files, parse them to generate policies and forward it to PDP.
+```
+java -cp "<comma separated directories containing jar files>" org.onap.policy.distribution.main.startstop.Main -c s3pConfig.json
+```
+ Or if you want to launch it from docker, please do the followings:
+```
+mkdir -p /tmp/policy_distribution/csar/
+docker run -d -e "CONFIG_FILE=/opt/app/policy/distribution/etc/s3pConfig.json" \
+ -v /tmp/policy_distribution/csar/:/tmp/policy_distribution/csar/ \
+ -p 6969:6969 \
+ --name policy-distribution policy-distribution
+```
+Here we use -e option to "docker run" to pass the config file which the policy distribution service will be launched upon and use -v option to map the local host /tmp/policy_distribution/csar/ directory as the directory of /tmp/policy_distribution/csar/ within the policy-distribution docker.
+
+**NOTED:**
+Please make sure when you launch the policy distribution service, the following requirements are met:
+a. The policy PDP service is active, and can be reached using the parameters configured by policyForwarderConfigurationParameters.xacmlPdpConfiguration.parameters in the s3pConfig.json file.
+
+b. Make sure you have installed the AAF root CA either in local host or in the docker image(running as root):
+```
+curl -s https://git.onap.org/dmaap/buscontroller/plain/misc/cert-client-init.sh | bash --
+```
+
+3. Get the Jmeter configuration ans scripts
+Git clone the policy distribution code, and goto the s3p directory:
+```
+git clone https://git.onap.org/policy/distribution policy-distribution
+cd policy-distribution/s3p
+```
+
+4. Run the JMeter stability test
+```
+rm -f perf.log; <jmeter_dir>/bin/jmeter.sh -t perf.jmx -n -Jhost=<pdp service hostname> -Jtotal=5 -l perf.log
+```
+In the meantime, you can run various system tools i.e. top, atop, etc. to monitor the cpu/memory usage of the policy-distribution service.
+
+After jmeter finished, search for 'Fail at idx' in the perf.log file to see if there is any errors found during the stability test.
+
+## JMeter properties
+We can configure the following properties when running the JMeter stability test for policy distribution
+| Property Name | Default Value | Description |
+|---------------|-------------|---------------|
+| host | pdp | PDP service host name or ip |
+| csardir | /tmp/policy_distribution/csar | Directory where to store the generated csar files |
+| total | 5 | Total number of csar files to be generated in bulk to test performance
+| retry | 100 | Number of retry to retrieve the policy of each csar
+
+