Update KPI Test load for 2 tests 80/140880/2
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 13 May 2025 14:27:34 +0000 (15:27 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Thu, 15 May 2025 07:08:34 +0000 (08:08 +0100)
- TODO Remove KPI test tweaks (for local testing)
- Removed storm load from CM AVC background load
- Changed Legacy Batch test to fixed rate of 200 request events per second
- Changed Legacy Batch test to fixed time of 15 min (=180,000 events)

Issue-ID: CPS-2743
Change-Id: Id1c795a56797637efc7cbd74b5c2bbb688648ac9
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
k6-tests/ncmp/common/utils.js
k6-tests/ncmp/config/kpi.json
k6-tests/ncmp/ncmp-test-runner.js

index 49feead..1934fc3 100644 (file)
@@ -33,7 +33,6 @@ export const READ_DATA_FOR_CM_HANDLE_DELAY_MS = 300; // must have same value as
 export const WRITE_DATA_FOR_CM_HANDLE_DELAY_MS = 670; // must have same value as in docker-compose.yml
 export const CONTENT_TYPE_JSON_PARAM = {'Content-Type': 'application/json'};
 export const LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE = 200;
-export const LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS = 100;
 export const MODULE_SET_TAGS = ['tagA', 'tagB', 'tagC', 'tagD', 'tagE'];
 
 /**
@@ -128,7 +127,7 @@ export function makeCustomSummaryReport(testResults, scenarioConfig) {
         makeSummaryCsvLine('4e', 'CM-handle search with Trust Level filter', 'milliseconds', 'cm_search_trustlevel_duration', 18000, testResults, scenarioConfig),
         makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', 18, testResults, scenarioConfig),
         makeSummaryCsvLine('6b', 'NCMP overhead for Synchronous single CM-handle pass-through write with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_write_alt_id', 18, testResults, scenarioConfig),
-        makeSummaryCsvLine('7', 'Legacy batch read operation', 'events/second', 'legacy_batch_read_cmhandles_per_second', 1750, testResults, scenarioConfig),
+        makeSummaryCsvLine('7', 'Legacy batch read operation', 'events/second', 'legacy_batch_read_cmhandles_per_second', 200, testResults, scenarioConfig),
     ];
     return summaryCsvLines.join('\n') + '\n';
 }
index 8168be1..dfe70cd 100644 (file)
       "startTime": "12s"
     },
     "legacy_batch_produce_scenario": {
-      "executor": "shared-iterations",
+      "executor": "constant-arrival-rate",
       "exec": "legacyBatchProduceScenario",
-      "vus": 2,
-      "iterations": 100
+      "rate": 1,
+      "preAllocatedVUs": 1,
+      "timeUnit": "1s",
+      "duration": "15m"
     },
     "legacy_batch_consume_scenario": {
       "executor": "per-vu-iterations",
       "exec": "legacyBatchConsumeScenario",
       "vus": 1,
-      "iterations": 1
+      "iterations": 1,
+      "maxDuration": "16m"
     },
-    "produceKafkaMessagesStorm": {
+    "produceCmAvcBackGroundLoadAtPeakRate": {
       "executor": "constant-arrival-rate",
-      "rate": 26,
-      "timeUnit": "1s",
-      "duration": "6m",
-      "preAllocatedVUs": 26,
-      "maxVUs": 30,
       "exec": "produceAvcEventsScenario",
-      "gracefulStop": "10s"
-    },
-    "produceKafkaMessagesNormal": {
-      "executor": "constant-arrival-rate",
-      "rate": 6,
+      "rate": 11,
       "timeUnit": "1s",
-      "duration": "8m",
-      "preAllocatedVUs": 6,
-      "maxVUs": 8,
-      "exec": "produceAvcEventsScenario",
-      "gracefulStop": "10s",
-      "startTime": "7m"
+      "duration": "15m",
+      "preAllocatedVUs": 11,
+      "maxVUs": 12,
+      "gracefulStop": "10s"
     }
   },
   "thresholds": {
index 655416b..5049bba 100644 (file)
@@ -24,7 +24,7 @@ import { Reader } from 'k6/x/kafka';
 import {
     TOTAL_CM_HANDLES, READ_DATA_FOR_CM_HANDLE_DELAY_MS, WRITE_DATA_FOR_CM_HANDLE_DELAY_MS,
     makeCustomSummaryReport, makeBatchOfCmHandleIds, makeRandomBatchOfAlternateIds,
-    LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE, REGISTRATION_BATCH_SIZE, LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS,
+    LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE, REGISTRATION_BATCH_SIZE,
     KAFKA_BOOTSTRAP_SERVERS, LEGACY_BATCH_TOPIC_NAME, CONTAINER_UP_TIME_IN_SECONDS, testConfig
 } from './common/utils.js';
 import { createCmHandles, deleteCmHandles, waitForAllCmHandlesToBeReady } from './common/cmhandle-crud.js';
@@ -207,7 +207,8 @@ export function produceAvcEventsScenario() {
 }
 
 export function legacyBatchConsumeScenario() {
-    const TOTAL_MESSAGES_TO_CONSUME = LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS * LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE;
+    // calculate total messages 15 minutes times 60 seconds times
+    const TOTAL_MESSAGES_TO_CONSUME = 15 * 60 * LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE;
     try {
         let messagesConsumed = 0;
         let startTime = Date.now();