summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/ncmp-kpi.js
diff options
context:
space:
mode:
authorDaniel Hanrahan <daniel.hanrahan@est.tech>2024-07-16 09:24:18 +0000
committerGerrit Code Review <gerrit@onap.org>2024-07-16 09:24:18 +0000
commitac58e919008c4449b389d3681a6f8aa216cb5f8f (patch)
treec9c482420047c2418ffd0b746f9b5b9ddd1074f0 /k6-tests/ncmp/ncmp-kpi.js
parent76676aa6d9b4a1336b8d1f392296995bcdde3439 (diff)
parentfcc81ee3a4b9ae937e0f447ee574b676506b6390 (diff)
Merge "Add passthrough write (CUD) operations to k6"
Diffstat (limited to 'k6-tests/ncmp/ncmp-kpi.js')
-rw-r--r--k6-tests/ncmp/ncmp-kpi.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js
index 91a38d99ce..24fbef0bfc 100644
--- a/k6-tests/ncmp/ncmp-kpi.js
+++ b/k6-tests/ncmp/ncmp-kpi.js
@@ -23,7 +23,7 @@ import { Gauge } from 'k6/metrics';
import { TOTAL_CM_HANDLES, makeCustomSummaryReport, recordTimeInSeconds } from './common/utils.js';
import { registerAllCmHandles, deregisterAllCmHandles } from './common/cmhandle-crud.js';
import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
-import { passthroughRead } from './common/passthrough-read.js';
+import { passthroughRead, passthroughWrite } from './common/passthrough-crud.js';
let cmHandlesCreatedPerSecondGauge = new Gauge('cmhandles_created_per_second');
let cmHandlesDeletedPerSecondGauge = new Gauge('cmhandles_deleted_per_second');
@@ -40,6 +40,12 @@ export const options = {
vus: 10,
duration: DURATION,
},
+ passthrough_write: {
+ executor: 'constant-vus',
+ exec: 'passthrough_write',
+ vus: 10,
+ duration: DURATION,
+ },
id_search_module: {
executor: 'constant-vus',
exec: 'id_search_module',
@@ -57,6 +63,7 @@ export const options = {
'cmhandles_created_per_second': ['value >= 22'],
'cmhandles_deleted_per_second': ['value >= 22'],
'http_req_failed{scenario:passthrough_read}': ['rate == 0'],
+ 'http_reqs{scenario:passthrough_write}': ['rate >= 13'],
'http_req_failed{scenario:id_search_module}': ['rate == 0'],
'http_req_failed{scenario:cm_search_module}': ['rate == 0'],
'http_req_duration{scenario:passthrough_read}': ['avg <= 2600'], // DMI delay + 100 ms
@@ -80,6 +87,11 @@ export function passthrough_read() {
check(response, { 'passthrough read status equals 200': (r) => r.status === 200 });
}
+export function passthrough_write() {
+ const response = passthroughWrite();
+ check(response, { 'passthrough write status equals 200': (r) => r.status === 200 });
+}
+
export function id_search_module() {
const response = executeCmHandleIdSearch('module');
check(response, { 'module ID search status equals 200': (r) => r.status === 200 });