Preparation/Installation

Please follow the steps at 72 Hours Stability Test Plan of Policy SDC Service Distribution to setup the test environment.

Test Plan

 The Performance test will run the following steps in a single thread loop

  • Delete existing policy if it matches the policies we're about to generate - send DELETE restful API to pdp and pap 

  • Generate the total number of random csar file and move them into the directory where being monitored.

  • Get the all policies from pdp matching the generated csars -  sent restful API to pdp to get the matching policy, retry if failed, until it succeed or retry number encountered.

Please check https://git.onap.org/policy/distribution/tree/s3p/README.perf.md for Jmeter parameter we can use for performance test 

Run the following commands to start performance test:

$ cd /home/ubuntu/policy-distribution/s3p
$ rm -f /tmp/policy_distribution/csar/*.csar
$ rm perf.log; ~/apache-jmeter-5.0/bin/jmeter.sh -n -t perf.jmx -Jhost=pdp -Jtotal=100 -Jretry=200 -l perf.log

# get the total number csar files generated:
$ cat perf_data.csv  | wc -l
100
# get the index of the failed policy which does not retrieved from PDP
$ grep "Fail at idx" perf.log 
1542687399593,34,final_check,410,Fail at idx 97,Thread Group 1-1,text,false,,0,0,1,1,null,0,0,0


Record the following metrics:

  • CPU time of the policy distribution service (we could use GNU time to track this)
  • memory consumption of the distribution service  (we could use GNU time to track this)
  • average time to parse and generate the policy for each csar
  • ratio of number of successful csar files have been processed by policy distribution / total csar
  • ratio of number of successful policy configs in PDP / total csar 
  • total number of time to get all policy configs in PDP
  • No labels