blob: 439719be3d4f9fae606ffd0a6d4823e8370a6fc1 [file] [log] [blame]
Pamela Dragoshba45dc62020-04-16 09:27:44 -04001.. This work is licensed under a
2.. Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4
5.. _api-s3p-label:
6
7.. toctree::
8 :maxdepth: 2
9
10Policy API S3P Tests
11####################
12
13
1472 Hours Stability Test of Policy API
15+++++++++++++++++++++++++++++++++++++
16
17Introduction
18------------
19
jhha4ff7b82020-10-23 09:15:35 -050020The 72 hour stability test of policy API has the goal of verifying the stability of running policy design API REST
21service by ingesting a steady flow of transactions in a multi-threaded fashion to
22simulate multiple clients' behaviors.
23All the transaction flows are initiated from a test client server running JMeter for the duration of 72 hours.
Pamela Dragoshba45dc62020-04-16 09:27:44 -040024
25Setup Details
26-------------
27
jhha4ff7b82020-10-23 09:15:35 -050028The stability test was performed on a default ONAP OOM installation in the Intel Wind River Lab environment.
29JMeter was installed on a separate VM to inject the traffic defined in the
30`API stability script
31<https://git.onap.org/policy/api/tree/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx>`_
32with the following command:
Pamela Dragoshba45dc62020-04-16 09:27:44 -040033
34.. code-block:: bash
Chris Ramstad6fca6792020-05-19 12:35:57 -070035
jhha4ff7b82020-10-23 09:15:35 -050036 jmeter.sh --nongui --testfile policy_api_stability.jmx --logfile result.jtl
Pamela Dragoshba45dc62020-04-16 09:27:44 -040037
Pamela Dragoshba45dc62020-04-16 09:27:44 -040038
Chris Ramstad6fca6792020-05-19 12:35:57 -070039Test Plan
40---------
Pamela Dragoshba45dc62020-04-16 09:27:44 -040041
Chris Ramstad6fca6792020-05-19 12:35:57 -070042The 72+ hours stability test will be running the following steps sequentially
43in multi-threaded loops. Thread number is set to 5 to simulate 5 API clients'
44behaviors (they can be calling the same policy CRUD API simultaneously).
45Each thread creates a different version of the policy types and policies to not
46interfere with one another while operating simultaneously. The point version
47of each entity is set to the running thread number.
48
49**Setup Thread (will be running only once)**
50
51- Get policy-api Healthcheck
52- Get API Counter Statistics
53- Get Preloaded Policy Types
54
55**API Test Flow (5 threads running the same steps in the same loop)**
56
57- Create a new Monitoring Policy Type with Version 6.0.#
58- Create a new Monitoring Policy Type with Version 7.0.#
59- Create a new Optimization Policy Type with Version 6.0.#
60- Create a new Guard Policy Type with Version 6.0.#
61- Create a new Native APEX Policy Type with Version 6.0.#
62- Create a new Native Drools Policy Type with Version 6.0.#
63- Create a new Native XACML Policy Type with Version 6.0.#
64- Get All Policy Types
65- Get All Versions of the new Monitoring Policy Type
66- Get Version 6.0.# of the new Monitoring Policy Type
67- Get Version 6.0.# of the new Optimzation Policy Type
68- Get Version 6.0.# of the new Guard Policy Type
69- Get Version 6.0.# of the new Native APEX Policy Type
70- Get Version 6.0.# of the new Native Drools Policy Type
71- Get Version 6.0.# of the new Native XACML Policy Type
72- Get the Latest Version of the New Monitoring Policy Type
73- Create Monitoring Policy Ver 6.0.# w/Monitoring Policy Type Ver 6.0.#
74- Create Monitoring Policy Ver 7.0.# w/Monitoring Policy Type Ver 7.0.#
75- Create Optimization Policy Ver 6.0.# w/Optimization Policy Type Ver 6.0.#
76- Create Guard Policy Ver 6.0.# w/Guard Policy Type Ver 6.0.#
77- Create Native APEX Policy Ver 6.0.# w/Native APEX Policy Type Ver 6.0.#
78- Create Native Drools Policy Ver 6.0.# w/Native Drools Policy Type Ver 6.0.#
79- Create Native XACML Policy Ver 6.0.# w/Native XACML Policy Type Ver 6.0.#
80- Get Version 6.0.# of the new Monitoring Policy
81- Get Version 6.0.# of the new Optimzation Policy
82- Get Version 6.0.# of the new Guard Policy
83- Get Version 6.0.# of the new Native APEX Policy
84- Get Version 6.0.# of the new Native Drools Policy
85- Get Version 6.0.# of the new Native XACML Policy
86- Get the Latest Version of the new Monitoring Policy
87- Delete Version 6.0.# of the new Monitoring Policy
88- Delete Version 7.0.# of the new Monitoring Policy
89- Delete Version 6.0.# of the new Optimzation Policy
90- Delete Version 6.0.# of the new Guard Policy
91- Delete Version 6.0.# of the new Native APEX Policy
92- Delete Version 6.0.# of the new Native Drools Policy
93- Delete Version 6.0.# of the new Native XACML Policy
94- Delete Monitoring Policy Type with Version 6.0.#
95- Delete Monitoring Policy Type with Version 7.0.#
96- Delete Optimization Policy Type with Version 6.0.#
97- Delete Guard Policy Type with Version 6.0.#
98- Delete Native APEX Policy Type with Version 6.0.#
99- Delete Native Drools Policy Type with Version 6.0.#
100- Delete Native XACML Policy Type with Version 6.0.#
101
102**TearDown Thread (will only be running after API Test Flow is completed)**
103
104- Get policy-api Healthcheck
105- Get Preloaded Policy Types
106
107
jhha4ff7b82020-10-23 09:15:35 -0500108Test Results
109------------
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400110
111**Summary**
112
jhha4ff7b82020-10-23 09:15:35 -0500113No errors were found during the 72 hours of the Policy API stability run.
114The load was performed against a non-tweaked ONAP OOM installation.
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400115
116**Test Statistics**
117
118======================= ============= =========== =============================== =============================== ===============================
jhha4ff7b82020-10-23 09:15:35 -0500119**Total # of requests** **Success %** **TPS** **Avg. time taken per request** **Min. time taken per request** **Max. time taken per request**
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400120======================= ============= =========== =============================== =============================== ===============================
lapentafd76d34fa2021-03-29 11:29:00 +0100121 627746 100% 2.42 2058 ms 26 ms 72809 ms
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400122======================= ============= =========== =============================== =============================== ===============================
123
lapentafd76d34fa2021-03-29 11:29:00 +0100124.. image:: images/api-s3p-jm-1_H.png
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400125
126**JMeter Results**
127
jhhab948fc2020-10-23 17:30:34 -0500128The following graphs show the response time distributions. The "Get Policy Types" API calls are the most expensive calls that
jhha4ff7b82020-10-23 09:15:35 -0500129average a 10 seconds plus response time.
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400130
lapentafd76d34fa2021-03-29 11:29:00 +0100131.. image:: images/api-response-time-distribution_H.png
132.. image:: images/api-response-time-overtime_H.png
Chris Ramstad6fca6792020-05-19 12:35:57 -0700133
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400134
135Performance Test of Policy API
136++++++++++++++++++++++++++++++
137
lapentafd76d34fa2021-03-29 11:29:00 +0100138A specific performance test was omitted in Honululu (as in Guilin). The JMeter script used in the stability run injected
jhha4ff7b82020-10-23 09:15:35 -0500139back to back traffic with 5 parallel threads with no pauses between requests. Since the JMeter threads operate
140in synchronous mode (waiting for a request's response before sending the next request), JMeter injection rates autoregulate
141because of the backpressure imposed by the response times. Even though the response times are high, the
142"Response over Time" graph above indicates that they remain constant at large, throughout the duration of the test.
143This together with the absence of notorious spikes in the kubernetes node CPU utilization suggests that the API
144component is not strained. A more enlightning set of tests, would plot jmeter threads (increasing load)
145against response times. These tests have not been performed in this release.
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400146
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400147
Pamela Dragoshba45dc62020-04-16 09:27:44 -0400148