From 1b989690971fc917e872d51d2908dd758c31a018 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:26:09 +0100 Subject: [PATCH 01/34] PAGOPA-658 adjusting perf test pipeline --- .devops/performance-test-pipelines.yml | 31 +++++++----------------- performance-test/run_performance_test.sh | 11 +++++++-- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.devops/performance-test-pipelines.yml b/.devops/performance-test-pipelines.yml index cdc722e..d42d589 100644 --- a/.devops/performance-test-pipelines.yml +++ b/.devops/performance-test-pipelines.yml @@ -2,19 +2,9 @@ trigger: none pool: - name: performance-test-linux + name: 'pagopa-dev-loadtest-linux' parameters: - - name: "API_SUBSCRIPTION_KEY" - displayName: "API_SUBSCRIPTION_KEY" - type: string - - name: "ENVIRONMENT" - displayName: "Environment" - type: string - values: - - "dev" - - "uat" - - "prod" - name: "TEST_TYPE" displayName: "Test type" type: string @@ -23,25 +13,22 @@ parameters: - "spike" - "stress" - "soak" - - # TODO: add your values - name: "SCRIPT" displayName: "Script name" type: string values: - - yourscriptname # TODO: add your script + - full_load_test + +variables: + API_SUBSCRIPTION_KEY: $(DEV_POC_ENROLLMENT_SUB_KEY) steps: - script: | - cd ./performance-tests/src + cd ./performance-test/src docker pull grafana/k6 displayName: Pull k6 image - # TODO: add your env params - script: | - docker run \ - -v ${PWD}:/script \ - -e API_SUBSCRIPTION_KEY=${{ parameters.API_SUBSCRIPTION_KEY }} \ - -e VARS=${{ parameters.ENVIRONMENT }}.environment.json \ - -e TEST_TYPE=./test-types/${{ parameters.TEST_TYPE }}.json \ - grafana/k6 run /script/${{ parameters.SCRIPT }}.js \ - displayName: Run k6 ${{ parameters.SCRIPT }} on ${{ parameters.ENVIRONMENT }} \ No newline at end of file + cd ./performance-test + sh ./run_performance_test.sh dev ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} poc-quarkus-k6 $(API_SUBSCRIPTION_KEY) + displayName: Run k6 ${{ parameters.SCRIPT }} on dev diff --git a/performance-test/run_performance_test.sh b/performance-test/run_performance_test.sh index be0280a..2472219 100644 --- a/performance-test/run_performance_test.sh +++ b/performance-test/run_performance_test.sh @@ -2,7 +2,8 @@ ENVIRONMENT=$1 TYPE=$2 SCRIPT=$3 -API_SUBSCRIPTION_KEY=$4 +DB_NAME=$4 +API_SUBSCRIPTION_KEY=$5 if [ -z "$ENVIRONMENT" ] then @@ -20,16 +21,22 @@ then echo "No script name specified: sh run_performance_test.sh " exit 1 fi +if [ -z "$DB_NAME" ] +then + DB_NAME="poc-quarkus-k6" + echo "No DB name specified: 'poc-quarkus-k6' is used." +fi export env=${ENVIRONMENT} export type=${TYPE} export script=${SCRIPT} +export db_name=${DB_NAME} export sub_key=${API_SUBSCRIPTION_KEY} docker rm nginx docker rm k6 stack_name=$(cd .. && basename "$PWD") -docker compose -p "${stack_name}" up -d --remove-orphans --force-recreate --build +docker compose -p "${stack_name}-k6" up -d --remove-orphans --force-recreate --build docker logs -f k6 docker stop nginx From d70332647665f12ce30ef4174f87e4bcd119ad4a Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:31:50 +0100 Subject: [PATCH 02/34] PAGOPA-658 fixing job name --- .devops/performance-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/performance-test-pipelines.yml b/.devops/performance-test-pipelines.yml index d42d589..ddbc388 100644 --- a/.devops/performance-test-pipelines.yml +++ b/.devops/performance-test-pipelines.yml @@ -31,4 +31,4 @@ steps: - script: | cd ./performance-test sh ./run_performance_test.sh dev ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} poc-quarkus-k6 $(API_SUBSCRIPTION_KEY) - displayName: Run k6 ${{ parameters.SCRIPT }} on dev + displayName: Run k6 ${{ parameters.SCRIPT }} on dev From d641dad9ab291b2015dc9782c511ac92d2de6b2e Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:52:54 +0100 Subject: [PATCH 03/34] PAGOPA-658 fixing empty body in request --- performance-test/src/full_load_test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/performance-test/src/full_load_test.js b/performance-test/src/full_load_test.js index bbc1a6c..323cb15 100644 --- a/performance-test/src/full_load_test.js +++ b/performance-test/src/full_load_test.js @@ -32,8 +32,7 @@ export default function () { var url = `${rootUrl}/organizations/${organization_fiscal_code}${frameworkType}`; - - var r = http.post(url, params); + var r = http.post(url, "", params); console.log("CreateOrganization call - organization_fiscal_code = " + organization_fiscal_code + ", Status = " + r.status); @@ -62,7 +61,7 @@ export default function () { url = `${rootUrl}/organizations/${organization_fiscal_code}${frameworkType}`; - r = http.del(url, params); + r = http.del(url, "", params); console.log("DeleteOrganization call - organization_fiscal_code = " + organization_fiscal_code + ", Status = " + r.status); From ef3e9c51ebf80d489ccf802e282e8a906a7f83b6 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:05:29 +0100 Subject: [PATCH 04/34] PAGOPA-658 debugging grafana input --- performance-test/run_performance_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/performance-test/run_performance_test.sh b/performance-test/run_performance_test.sh index 2472219..a6eacc5 100644 --- a/performance-test/run_performance_test.sh +++ b/performance-test/run_performance_test.sh @@ -5,6 +5,8 @@ SCRIPT=$3 DB_NAME=$4 API_SUBSCRIPTION_KEY=$5 +echo 'Writing on ' + DB_NAME + if [ -z "$ENVIRONMENT" ] then echo "No env specified: sh run_performance_test.sh " From 0ced306f7fc712bc6b9770f84b427e79f540f3d0 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:07:38 +0100 Subject: [PATCH 05/34] PAGOPA-658 debugging grafana input part2 --- performance-test/run_performance_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/run_performance_test.sh b/performance-test/run_performance_test.sh index a6eacc5..6b50cb3 100644 --- a/performance-test/run_performance_test.sh +++ b/performance-test/run_performance_test.sh @@ -5,7 +5,7 @@ SCRIPT=$3 DB_NAME=$4 API_SUBSCRIPTION_KEY=$5 -echo 'Writing on ' + DB_NAME +echo 'Writing on ' + $DB_NAME if [ -z "$ENVIRONMENT" ] then From 4f8870c8d9107b0c63ea14578a4114dea9f102a7 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:11:17 +0100 Subject: [PATCH 06/34] PAGOPA-658 debugging grafana input part3 --- .devops/performance-test-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/performance-test-pipelines.yml b/.devops/performance-test-pipelines.yml index ddbc388..a657d92 100644 --- a/.devops/performance-test-pipelines.yml +++ b/.devops/performance-test-pipelines.yml @@ -30,5 +30,5 @@ steps: - script: | cd ./performance-test - sh ./run_performance_test.sh dev ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} poc-quarkus-k6 $(API_SUBSCRIPTION_KEY) + sh ./run_performance_test.sh dev ${{ parameters.TEST_TYPE }} ${{ parameters.SCRIPT }} pocquarkusk6 $(API_SUBSCRIPTION_KEY) displayName: Run k6 ${{ parameters.SCRIPT }} on dev From 98ec9d1f1f75041e894176e32b48ef0dab7f8a8a Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:12:54 +0100 Subject: [PATCH 07/34] PAGOPA-658 removing debug --- performance-test/run_performance_test.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/performance-test/run_performance_test.sh b/performance-test/run_performance_test.sh index 6b50cb3..2472219 100644 --- a/performance-test/run_performance_test.sh +++ b/performance-test/run_performance_test.sh @@ -5,8 +5,6 @@ SCRIPT=$3 DB_NAME=$4 API_SUBSCRIPTION_KEY=$5 -echo 'Writing on ' + $DB_NAME - if [ -z "$ENVIRONMENT" ] then echo "No env specified: sh run_performance_test.sh " From 8803178d7be17b79487b50a17e598b2e5d496305 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:25:06 +0100 Subject: [PATCH 08/34] PAGOPA-658 removing unused file --- .../src/modules/orgsEnrollment_client.js | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 performance-test/src/modules/orgsEnrollment_client.js diff --git a/performance-test/src/modules/orgsEnrollment_client.js b/performance-test/src/modules/orgsEnrollment_client.js deleted file mode 100644 index c539378..0000000 --- a/performance-test/src/modules/orgsEnrollment_client.js +++ /dev/null @@ -1,55 +0,0 @@ -import { post, get, del } from "./common.js"; - -function healthCheckInfo(url) { - return get(url + `/info`, { - params: { frameworkType: "quarkus" }, - headers: { - "Ocp-Apim-Subscription-Key": __ENV.API_SUBSCRIPTION_KEY - } - }) -} - -function getOrganizations(url) { - return get(url + `/organizations`, { - params: { frameworkType: "quarkus" }, - headers: { - "Ocp-Apim-Subscription-Key": __ENV.API_SUBSCRIPTION_KEY - } - }) -} - -function getOrganization(url, idOrg) { - return get(url + `/organizations/${idOrg}`, { - params: { frameworkType: "quarkus" }, - headers: { - "Ocp-Apim-Subscription-Key": __ENV.API_SUBSCRIPTION_KEY - } - }) -} - -function createOrganization(url, idOrg) { - return post(url + `/organizations/${idOrg}`, { - params: { frameworkType: "quarkus" }, - headers: { - 'Ocp-Apim-Subscription-Key': __ENV.API_SUBSCRIPTION_KEY - }, - }) -} - -function removeOrganization(url, idOrg) { - return del(url + `/organizations/${idOrg}`, { - params: { frameworkType: "quarkus" }, - headers: { - "Ocp-Apim-Subscription-Key": __ENV.API_SUBSCRIPTION_KEY - } - }) -} - - -module.exports = { - healthCheckInfo, - getOrganizations, - getOrganization, - createOrganization, - removeOrganization -} \ No newline at end of file From 2f0cc7be32b85e76a385a77128b943c308bf37d2 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 23 Mar 2023 19:42:04 +0100 Subject: [PATCH 09/34] PAGOPA-658 beginning study --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 32e178e..74a9f7c 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 300, "timeUnit": "1s", - "preAllocatedVUs": 2, - "maxVUs": 100 + "preAllocatedVUs": 200, + "maxVUs": 10000 } }, "thresholds": { From 29238f92509244b25e7202e380fa3bd2cc271510 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 23 Mar 2023 19:43:33 +0100 Subject: [PATCH 10/34] PAGOPA-658 adding test types to pipeline --- .devops/performance-test-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devops/performance-test-pipelines.yml b/.devops/performance-test-pipelines.yml index a657d92..3a24c4b 100644 --- a/.devops/performance-test-pipelines.yml +++ b/.devops/performance-test-pipelines.yml @@ -12,7 +12,8 @@ parameters: - "load" - "spike" - "stress" - - "soak" + - "ramping" + - "constant" - name: "SCRIPT" displayName: "Script name" type: string From 064397ad0217c088da165f72a63827cc138f3a82 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:14:15 +0100 Subject: [PATCH 11/34] PAGOPA-658 modifying test --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 74a9f7c..f81aa7e 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 300, "timeUnit": "1s", "preAllocatedVUs": 200, - "maxVUs": 10000 + "maxVUs": 1000 } }, "thresholds": { From bba9161988252a6afcfc7f2a0a3e59270efd5104 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:16:30 +0100 Subject: [PATCH 12/34] PAGOPA-658 modifying test --- performance-test/src/test-types/load.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/performance-test/src/test-types/load.json b/performance-test/src/test-types/load.json index 9cad0d0..318ec45 100644 --- a/performance-test/src/test-types/load.json +++ b/performance-test/src/test-types/load.json @@ -11,16 +11,16 @@ ], "stages": [ { - "duration": "0.5s", - "target": 1 + "duration": "1m", + "target": 100 }, { - "duration": "0.5s", - "target": 1 + "duration": "2m", + "target": 200 }, { - "duration": "0s", - "target": 0 + "duration": "1m", + "target": 150 } ], "thresholds": { From 49cfafe9c282ad1f2d334299338351b6ed61341a Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:28:57 +0100 Subject: [PATCH 13/34] PAGOPA-658 modifying test --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index f81aa7e..8285d52 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 300, "timeUnit": "1s", "preAllocatedVUs": 200, - "maxVUs": 1000 + "maxVUs": 200 } }, "thresholds": { From 700a3dc9136a62825b6ea7e50c296e9e7b5afef3 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:53:38 +0100 Subject: [PATCH 14/34] PAGOPA-658 modifying test --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 8285d52..b44b726 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 300, "timeUnit": "1s", - "preAllocatedVUs": 200, - "maxVUs": 200 + "preAllocatedVUs": 300, + "maxVUs": 300 } }, "thresholds": { From b21ac949507a05a6dc335c0a01bb691e25875471 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:53:46 +0100 Subject: [PATCH 15/34] PAGOPA-658 modifying test --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index b44b726..5b8bb45 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 300, "timeUnit": "1s", - "preAllocatedVUs": 300, - "maxVUs": 300 + "preAllocatedVUs": 500, + "maxVUs": 500 } }, "thresholds": { From 5ddb067ad4aaa12942a5467d65cb88aa66d0f0b1 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:25:05 +0100 Subject: [PATCH 16/34] PAGOPA-658 adding flow --- .devops/performance-test-pipelines.yml | 1 + performance-test/src/create_organization.js | 82 +++++++-------------- 2 files changed, 26 insertions(+), 57 deletions(-) diff --git a/.devops/performance-test-pipelines.yml b/.devops/performance-test-pipelines.yml index 3a24c4b..c6ceb12 100644 --- a/.devops/performance-test-pipelines.yml +++ b/.devops/performance-test-pipelines.yml @@ -19,6 +19,7 @@ parameters: type: string values: - full_load_test + - create_organization variables: API_SUBSCRIPTION_KEY: $(DEV_POC_ENROLLMENT_SUB_KEY) diff --git a/performance-test/src/create_organization.js b/performance-test/src/create_organization.js index b273e2a..288f9f0 100644 --- a/performance-test/src/create_organization.js +++ b/performance-test/src/create_organization.js @@ -1,75 +1,43 @@ import http from 'k6/http'; import { check } from 'k6'; import { SharedArray } from 'k6/data'; +import { randomOrg } from './modules/helpers.js'; -import { createOrganization, deleteOrganization } from "./modules/orgsEnrollment_client.js"; - +//k6 run -o influxdb=http://influxdb:8086/k6 -e BASE_URL=http://localhost:8085 performance-test/src/full_load_test.js +//k6 run performance-test/src/full_load_test.js export let options = JSON.parse(open(__ENV.TEST_TYPE)); -// read configuration -// note: SharedArray can currently only be constructed inside init code -// according to https://k6.io/docs/javascript-api/k6-data/sharedarray -const varsArray = new SharedArray('vars', function() { - return JSON.parse(open(`./${__ENV.VARS}`)).environment; +const varsArray = new SharedArray('vars', function () { + return JSON.parse(open(`${__ENV.VARS}`)).environment; }); + // workaround to use shared array (only array should be used) const vars = varsArray[0]; -const orgsEnrollmentHost = `${vars.orgsEnrollmentHost}`; -const numberOfEventsToPreload = `${vars.numberOfEventsToPreload}`; - -const accountPrimaryKey = `${__ENV.API_SUBSCRIPTION_KEY}`; - -export function setup() { -} - -function precondition() { - // no pre conditions -} - -function postcondition(organizationFiscalCode) { - - // Delete the newly created organization. - let tag = { - gpdMethod: "DeleteOrganization", - }; - - const params = { - headers: { - 'Content-Type': 'application/json' - }, - }; - - const r = deleteOrganization(orgsEnrollmentHost, organizationFiscalCode, params); - - console.log("Delete organization " + organizationFiscalCode + " " + r.status); - - check(r, { - "DeleteOrganization status is 200": (_r) => r.status === 200, - }, tag); -} +const rootUrl = `${vars.host}`; -export default function(data) { +const params = { + headers: { + 'Content-Type': 'application/json', + 'Ocp-Apim-Subscription-Key': __ENV.API_SUBSCRIPTION_KEY + }, +}; +const frameworkType = `?frameworkType=quarkus` - // Create an organization - let tag = { - orgsEnrollmentMethod: "CreateOrganization", - }; +export default function () { - const params = { - headers: { - 'Content-Type': 'application/json' - }, - }; + const organization_fiscal_code = randomOrg(11, "0123456789"); - let mockOrganizationFiscalCode = 'mockOrganizationFiscalCode'; - console.log(orgsEnrollmentHost + 'organization/' + mockOrganizationFiscalCode); + // Create new debt position (no validity date). - const response = createOrganization(orgsEnrollmentHost, mockOrganizationFiscalCode, params); + var url = `${rootUrl}/organizations/${organization_fiscal_code}${frameworkType}`; - console.log(`CreateOrganization ... ${response.status}`); + var r = http.post(url, "", params); - check(response, {"CreateOrganization status is 201": (res) => (res.status === 201)}, tag); + console.log("CreateOrganization call - organization_fiscal_code = " + organization_fiscal_code + ", Status = " + r.status); - postcondition(mockOrganizationFiscalCode, params); -} + check(r, { + 'CreateOrganization status is 201': (r) => r.status === 201, + }); + } +} \ No newline at end of file From b9b52581b6b6fee530d04977d530596de24169e1 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:32:40 +0100 Subject: [PATCH 17/34] PAGOPA-658 minor fix --- performance-test/src/create_organization.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/performance-test/src/create_organization.js b/performance-test/src/create_organization.js index 288f9f0..3b44edc 100644 --- a/performance-test/src/create_organization.js +++ b/performance-test/src/create_organization.js @@ -38,6 +38,5 @@ export default function () { check(r, { 'CreateOrganization status is 201': (r) => r.status === 201, - }); - } + }); } \ No newline at end of file From 019c200dff32cf5ee428272426a5df743d746095 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Mon, 27 Mar 2023 11:07:41 +0200 Subject: [PATCH 18/34] PAGOPA-658 testing --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 5b8bb45..8285d52 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 300, "timeUnit": "1s", - "preAllocatedVUs": 500, - "maxVUs": 500 + "preAllocatedVUs": 200, + "maxVUs": 200 } }, "thresholds": { From f01c34d7ad815aac9d8314d95302680c0d2955df Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:20:57 +0200 Subject: [PATCH 19/34] PAGOPA-658 testing --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 8285d52..0fb8254 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -14,9 +14,9 @@ "contacts": { "executor": "constant-arrival-rate", "duration": "3m", - "rate": 300, + "rate": 200, "timeUnit": "1s", - "preAllocatedVUs": 200, + "preAllocatedVUs": 150, "maxVUs": 200 } }, From 6a223fd20bdf1595aa4dfc1caec3ab4efd41f730 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:16:28 +0200 Subject: [PATCH 20/34] PAGOPA-658 testing --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 0fb8254..12ed2d6 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 200, "timeUnit": "1s", "preAllocatedVUs": 150, - "maxVUs": 200 + "maxVUs": 500 } }, "thresholds": { From 7391cbc3e768e652d402e5f7ffbbd89092a6f218 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:20:18 +0200 Subject: [PATCH 21/34] PAGOPA-658 testing --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 12ed2d6..0fb8254 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 200, "timeUnit": "1s", "preAllocatedVUs": 150, - "maxVUs": 500 + "maxVUs": 200 } }, "thresholds": { From 670b872ab9368212fc43583ac9f46151be499982 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:31:44 +0200 Subject: [PATCH 22/34] PAGOPA-658 lowering vus --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 0fb8254..1cc82d7 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 200, "timeUnit": "1s", - "preAllocatedVUs": 150, - "maxVUs": 200 + "preAllocatedVUs": 100, + "maxVUs": 100 } }, "thresholds": { From 520ef0882322ff3c0ca15aa4d91ca37353f40853 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:03:09 +0200 Subject: [PATCH 23/34] PAGOPA-658 different vus --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 1cc82d7..9cf5716 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 200, "timeUnit": "1s", - "preAllocatedVUs": 100, - "maxVUs": 100 + "preAllocatedVUs": 150, + "maxVUs": 150 } }, "thresholds": { From e01c080a4322cb4202226556ea52655488fd1b46 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:13:03 +0200 Subject: [PATCH 24/34] PAGOPA-658 different vus --- performance-test/src/test-types/constant.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 9cf5716..e0264f9 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,8 +16,8 @@ "duration": "3m", "rate": 200, "timeUnit": "1s", - "preAllocatedVUs": 150, - "maxVUs": 150 + "preAllocatedVUs": 200, + "maxVUs": 200 } }, "thresholds": { From 70d9652823f544fcdf3b6342c768ca8967af3824 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:19:31 +0200 Subject: [PATCH 25/34] PAGOPA-658 different vus --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index e0264f9..0fb8254 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -16,7 +16,7 @@ "duration": "3m", "rate": 200, "timeUnit": "1s", - "preAllocatedVUs": 200, + "preAllocatedVUs": 150, "maxVUs": 200 } }, From 8648ee84e26b90b30e7f4eb98cfa514055058e74 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 29 Mar 2023 12:33:51 +0200 Subject: [PATCH 26/34] PAGOPA-658 boosting machines --- helm/values-dev.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 11e3b6a..9610f07 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -42,15 +42,15 @@ microservice-chart: allowPrivilegeEscalation: false resources: requests: - memory: "384Mi" - cpu: "0.20" + memory: "512Mi" + cpu: "0.25" limits: memory: "512Mi" - cpu: "0.30" + cpu: "0.25" autoscaling: enable: true - minReplica: 1 - maxReplica: 2 + minReplica: 3 + maxReplica: 10 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds triggers: From 3b8839b9f0937e7566fd1bc4e70797ed473a4e18 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:16:27 +0200 Subject: [PATCH 27/34] PAGOPA-658 changing helm --- helm/values-dev.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 9610f07..5d7b5ae 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -42,7 +42,7 @@ microservice-chart: allowPrivilegeEscalation: false resources: requests: - memory: "512Mi" + memory: "256Mi" cpu: "0.25" limits: memory: "512Mi" @@ -50,15 +50,9 @@ microservice-chart: autoscaling: enable: true minReplica: 3 - maxReplica: 10 + maxReplica: 3 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds - triggers: - - type: cpu - metadata: - # Required - type: Utilization # Allowed types are 'Utilization' or 'AverageValue' - value: "75" envConfig: WEBSITE_SITE_NAME: 'pagopa-poc-quarkus-service' # required to show cloud role name in application insights ENV: 'dev' From 367f9e9203e19a11adf72b7313a28093809d8c3b Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:23:49 +0200 Subject: [PATCH 28/34] PAGOPA-658 minor fix helm --- helm/values-dev.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 5d7b5ae..29ba020 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -53,6 +53,12 @@ microservice-chart: maxReplica: 3 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds + triggers: + - type: cpu + metadata: + # Required + type: Utilization # Allowed types are 'Utilization' or 'AverageValue' + value: "75" envConfig: WEBSITE_SITE_NAME: 'pagopa-poc-quarkus-service' # required to show cloud role name in application insights ENV: 'dev' From 93d206bffc066d424545872cdf2b4d75a9abfbed Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:30:45 +0200 Subject: [PATCH 29/34] PAGOPA-658 minor fix helm --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 29ba020..06dcabd 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -49,7 +49,7 @@ microservice-chart: cpu: "0.25" autoscaling: enable: true - minReplica: 3 + minReplica: 1 maxReplica: 3 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds From f7e3e355eb14dabe51197578568442ac249683c4 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:07:07 +0200 Subject: [PATCH 30/34] PAGOPA-658 upgrading #pods --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 06dcabd..29ba020 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -49,7 +49,7 @@ microservice-chart: cpu: "0.25" autoscaling: enable: true - minReplica: 1 + minReplica: 3 maxReplica: 3 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds From f88143550fccec0dba6d64a6f75b0758783c0269 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:03:34 +0200 Subject: [PATCH 31/34] PAGOPA-658 modifying constant input --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 0fb8254..9cf5716 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 200, "timeUnit": "1s", "preAllocatedVUs": 150, - "maxVUs": 200 + "maxVUs": 150 } }, "thresholds": { From 59fe9cdbb3a7741ec84cba7cca57a42399f79666 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:26:55 +0200 Subject: [PATCH 32/34] PAGOPA-658 another test --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 9cf5716..0fb8254 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 200, "timeUnit": "1s", "preAllocatedVUs": 150, - "maxVUs": 150 + "maxVUs": 200 } }, "thresholds": { From b84d7fc8aa12ee1c6e3dac56644a3fa33f160881 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:34:51 +0200 Subject: [PATCH 33/34] PAGOPA-658 chagning perf scenario --- performance-test/src/test-types/constant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-test/src/test-types/constant.json b/performance-test/src/test-types/constant.json index 0fb8254..9cf5716 100644 --- a/performance-test/src/test-types/constant.json +++ b/performance-test/src/test-types/constant.json @@ -17,7 +17,7 @@ "rate": 200, "timeUnit": "1s", "preAllocatedVUs": 150, - "maxVUs": 200 + "maxVUs": 150 } }, "thresholds": { From 231d1de85831a9ae670f5506422df0db2f2dca37 Mon Sep 17 00:00:00 2001 From: FedericoRuzzier <49512050+FedericoRuzzier@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:35:33 +0200 Subject: [PATCH 34/34] PAGOPA-658 scale down pods --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 29ba020..06dcabd 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -49,7 +49,7 @@ microservice-chart: cpu: "0.25" autoscaling: enable: true - minReplica: 3 + minReplica: 1 maxReplica: 3 pollingInterval: 10 # seconds cooldownPeriod: 50 # seconds