From 67538f598f09ef524a1d284831360d67d3f6a4b8 Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Mon, 18 Oct 2021 10:21:06 +0100 Subject: Policy-API S3P documentation changes Pushing this review on behalf of prakhar.pandey@bell.ca Change-Id: I943e5c192cd1a2984ff80283004ef18779c32a30 Issue-ID: POLICY-3652 Signed-off-by: a.sreekumar --- .../api-response-time-distribution_I.png | Bin 0 -> 614064 bytes ...pi-response-time-distribution_performance_I.png | Bin 0 -> 646005 bytes .../api-response-time-overtime_I.png | Bin 0 -> 1015620 bytes .../api-response-time-overtime_performance_I.png | Bin 0 -> 1079769 bytes .../devtools/api-s3p-results/api-s3p-jm-1_I.png | Bin 0 -> 842239 bytes .../devtools/api-s3p-results/api-s3p-jm-2_I.png | Bin 0 -> 825434 bytes .../devtools/api-s3p-results/api_top_after_72h.JPG | Bin 0 -> 734132 bytes .../api-s3p-results/api_top_before_72h.JPG | Bin 0 -> 708386 bytes docs/development/devtools/api-s3p.rst | 38 +++++++++++++++------ 9 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 docs/development/devtools/api-s3p-results/api-response-time-distribution_I.png create mode 100644 docs/development/devtools/api-s3p-results/api-response-time-distribution_performance_I.png create mode 100644 docs/development/devtools/api-s3p-results/api-response-time-overtime_I.png create mode 100644 docs/development/devtools/api-s3p-results/api-response-time-overtime_performance_I.png create mode 100644 docs/development/devtools/api-s3p-results/api-s3p-jm-1_I.png create mode 100644 docs/development/devtools/api-s3p-results/api-s3p-jm-2_I.png create mode 100644 docs/development/devtools/api-s3p-results/api_top_after_72h.JPG create mode 100644 docs/development/devtools/api-s3p-results/api_top_before_72h.JPG (limited to 'docs/development/devtools') diff --git a/docs/development/devtools/api-s3p-results/api-response-time-distribution_I.png b/docs/development/devtools/api-s3p-results/api-response-time-distribution_I.png new file mode 100644 index 00000000..b53da6ba Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-response-time-distribution_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api-response-time-distribution_performance_I.png b/docs/development/devtools/api-s3p-results/api-response-time-distribution_performance_I.png new file mode 100644 index 00000000..e65cc151 Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-response-time-distribution_performance_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api-response-time-overtime_I.png b/docs/development/devtools/api-s3p-results/api-response-time-overtime_I.png new file mode 100644 index 00000000..ad2f62e9 Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-response-time-overtime_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api-response-time-overtime_performance_I.png b/docs/development/devtools/api-s3p-results/api-response-time-overtime_performance_I.png new file mode 100644 index 00000000..91d291bd Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-response-time-overtime_performance_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api-s3p-jm-1_I.png b/docs/development/devtools/api-s3p-results/api-s3p-jm-1_I.png new file mode 100644 index 00000000..d38df8dc Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-s3p-jm-1_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api-s3p-jm-2_I.png b/docs/development/devtools/api-s3p-results/api-s3p-jm-2_I.png new file mode 100644 index 00000000..1c85d949 Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api-s3p-jm-2_I.png differ diff --git a/docs/development/devtools/api-s3p-results/api_top_after_72h.JPG b/docs/development/devtools/api-s3p-results/api_top_after_72h.JPG new file mode 100644 index 00000000..c69b2d0f Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api_top_after_72h.JPG differ diff --git a/docs/development/devtools/api-s3p-results/api_top_before_72h.JPG b/docs/development/devtools/api-s3p-results/api_top_before_72h.JPG new file mode 100644 index 00000000..c2d17afa Binary files /dev/null and b/docs/development/devtools/api-s3p-results/api_top_before_72h.JPG differ diff --git a/docs/development/devtools/api-s3p.rst b/docs/development/devtools/api-s3p.rst index 55867b44..1c66297b 100644 --- a/docs/development/devtools/api-s3p.rst +++ b/docs/development/devtools/api-s3p.rst @@ -33,8 +33,9 @@ with the following command: .. code-block:: bash - jmeter.sh --nongui --testfile policy_api_stability.jmx --logfile result.jtl + nohup ./apache-jmeter-5.4.1/bin/jmeter.sh -n -t policy_api_stability.jmx -l stabilityTestResultsPolicyApi.jtl +The test was run in the background via “nohup”, to prevent it from being interrupted. Test Plan --------- @@ -54,6 +55,7 @@ of each entity is set to the running thread number. **API Test Flow (5 threads running the same steps in the same loop)** +- Get Policy Metrics - Create a new Monitoring Policy Type with Version 6.0.# - Create a new Monitoring Policy Type with Version 7.0.# - Create a new Optimization Policy Type with Version 6.0.# @@ -118,18 +120,31 @@ The load was performed against a non-tweaked ONAP OOM installation. ======================= ============= =========== =============================== =============================== =============================== **Total # of requests** **Success %** **TPS** **Avg. time taken per request** **Min. time taken per request** **Max. time taken per request** ======================= ============= =========== =============================== =============================== =============================== - 627746 100% 2.42 2058 ms 26 ms 72809 ms + 242277 100% 0.935 5340 ms 1 ms 736976 ms ======================= ============= =========== =============================== =============================== =============================== -.. image:: images/api-s3p-jm-1_H.png +.. image:: api-s3p-results/api-s3p-jm-1_I.png **JMeter Results** The following graphs show the response time distributions. The "Get Policy Types" API calls are the most expensive calls that -average a 10 seconds plus response time. +average a 7 seconds plus response time. -.. image:: images/api-response-time-distribution_H.png -.. image:: images/api-response-time-overtime_H.png +.. image:: api-s3p-results/api-response-time-distribution_I.png +.. image:: api-s3p-results/api-response-time-overtime_I.png + +**Memory and CPU usage** + +The memory and CPU usage can be monitored by running "top" command in the policy-api pod. +A snapshot is taken before and after test execution to monitor the changes in resource utilization. + +Memory and CPU usage before test execution: + +.. image:: api-s3p-results/api_top_before_72h.JPG + +Memory and CPU usage after test execution: + +.. image:: api-s3p-results/api_top_after_72h.JPG Performance Test of Policy API @@ -151,8 +166,9 @@ with the following command: .. code-block:: bash - jmeter.sh --nongui --testfile policy_api_performance.jmx --logfile result.jtl + nohup ./apache-jmeter-5.4.1/bin/jmeter.sh -n -t policy_api_performance.jmx -l performanceTestResultsPolicyApi.jtl +The test was run in the background via “nohup”, to prevent it from being interrupted. Test Plan --------- @@ -170,18 +186,18 @@ Running/Triggering performance test will be the same as stability test. That is, ======================= ============= =========== =============================== =============================== =============================== **Total # of requests** **Success %** **TPS** **Avg. time taken per request** **Min. time taken per request** **Max. time taken per request** ======================= ============= =========== =============================== =============================== =============================== - 4082 100% 0.45 1297 ms 4 ms 63612 ms + 2822 100% 0.31 63794 ms 2 ms 1183376 ms ======================= ============= =========== =============================== =============================== =============================== -.. image:: images/api-s3p-jm-2_H.png +.. image:: api-s3p-results/api-s3p-jm-2_I.png Test Results ------------ The following graphs show the response time distributions. -.. image:: images/api-response-time-distribution_performance_H.png -.. image:: images/api-response-time-overtime_performance_H.png +.. image:: api-s3p-results/api-response-time-distribution_performance_I.png +.. image:: api-s3p-results/api-response-time-overtime_performance_I.png -- cgit 1.2.3-korg