document guilin api stability run results
[policy/parent.git] / docs / development / devtools / api-s3p.rst
1 .. 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
10 Policy API S3P Tests
11 ####################
12
13
14 72 Hours Stability Test of Policy API
15 +++++++++++++++++++++++++++++++++++++
16
17 Introduction
18 ------------
19
20 The 72 hour stability test of policy API has the goal of verifying the stability of running policy design API REST
21 service by ingesting a steady flow of transactions in a multi-threaded fashion to
22 simulate multiple clients' behaviors.
23 All the transaction flows are initiated from a test client server running JMeter for the duration of 72 hours.
24
25 Setup Details
26 -------------
27
28 The stability test was performed on a default ONAP OOM installation in the Intel Wind River Lab environment.
29 JMeter 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>`_
32 with the following command:
33
34 .. code-block:: bash
35
36     jmeter.sh --nongui --testfile policy_api_stability.jmx --logfile result.jtl
37
38
39 Test Plan
40 ---------
41
42 The 72+ hours stability test will be running the following steps sequentially
43 in multi-threaded loops. Thread number is set to 5 to simulate 5 API clients'
44 behaviors (they can be calling the same policy CRUD API simultaneously).
45 Each thread creates a different version of the policy types and policies to not
46 interfere with one another while operating simultaneously.  The point version
47 of 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
108 Test Results
109 ------------
110
111 **Summary**
112
113 No errors were found during the 72 hours of the Policy API stability run.
114 The load was performed against a non-tweaked ONAP OOM installation.
115
116 **Test Statistics**
117
118 =======================  =============  ===========  ===============================  ===============================  ===============================
119 **Total # of requests**  **Success %**    **TPS**    **Avg. time taken per request**  **Min. time taken per request**  **Max. time taken per request**
120 =======================  =============  ===========  ===============================  ===============================  ===============================
121     176407                    100%         0.68              7340 ms                               34 ms                          49298 ms
122 =======================  =============  ===========  ===============================  ===============================  ===============================
123
124
125 **JMeter Results**
126
127 The following graphs shows the response time distribution.   The "Get Policy Types" API calls are the most expensive calls that
128 average a 10 seconds plus response time.
129
130 .. image:: images/api-response-time-distribution.png
131 .. image:: images/api-response-time-overtime.png
132
133
134 Performance Test of Policy API
135 ++++++++++++++++++++++++++++++
136
137 A specific performance test was omitted in Guilin.   The JMeter script used in the stability run injected
138 back to back traffic with 5 parallel threads with no pauses between requests.   Since the JMeter threads operate
139 in synchronous mode (waiting for a request's response before sending the next request), JMeter injection rates autoregulate
140 because of the backpressure imposed by the response times.   Even though the response times are high, the
141 "Response over Time" graph above indicates that they remain constant at large, throughout the duration of the test.
142 This together with the absence of notorious spikes in the kubernetes node CPU utilization suggests that the API
143 component is not strained.   A more enlightning set of tests, would plot jmeter threads (increasing load)
144 against response times.   These tests have not been performed in this release.
145
146
147