Setting up Performance Tests in APEX
The apex-pdp has built in support for performance testing. A special performance testing REST server is available in the code base for performance testing. It is in the module performance-benchmark-test. To execute a benchmark test, you start the REST server, and then configure and run APEX against the server. There are example configurations for running tests in the resources of this module.
Here is an example of how to do this:
- Clone and build the apex-pdp git repo
Go into the performance-benchmark-test module and run the REST server
cd testsuites/performance/performance-benchmark-test mvn exec:java -Dexec.mainClass="org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGenerator" -Dexec.args="-c src/main/resources/examples/benchmark/EventGeneratorConfig.json"
Separately, create a local directory and unzip the APEX tarball
mkdir apex cd apex tar zxvf ~/git/onap/policy/apex-pdp/packages/apex-pdp-package-full/target/*gz
Run APEX with a configuration that runs against the benchmark REST server
bin/apexApps.sh engine -c ~/git/onap/policy/apex-pdp/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json
To get the test results, Issue the following command using CURL or from a browser
curl http://localhost:32801/EventGenerator/Stats
The results are similar to those below: