summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/common
diff options
context:
space:
mode:
authorseanbeirne <sean.beirne@est.tech>2024-07-19 16:55:06 +0100
committerPriyank Maheshwari <priyank.maheshwari@est.tech>2024-08-12 13:41:31 +0000
commit285595282371807532862fa0293f6d5e3b5d3517 (patch)
tree1b3548153a3ec6c1be76241eb5107f4ea85390fa /k6-tests/ncmp/common
parentd3c1e7246ab4f41cf3dad97e559ca2736b0014cf (diff)
K6 performance test for Alternate Id Read
Issue-Id: CPS-2279 Change-Id: Iade53a85afb183c0df259c5e7fc12fa0f6986218 Signed-off-by: seanbeirne <sean.beirne@est.tech>
Diffstat (limited to 'k6-tests/ncmp/common')
-rw-r--r--k6-tests/ncmp/common/cmhandle-crud.js1
-rw-r--r--k6-tests/ncmp/common/passthrough-crud.js10
-rw-r--r--k6-tests/ncmp/common/utils.js1
3 files changed, 12 insertions, 0 deletions
diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
index 6d5aff7fca..6eb1923d39 100644
--- a/k6-tests/ncmp/common/cmhandle-crud.js
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -46,6 +46,7 @@ function createCmHandles(cmHandleIds) {
"dmiPlugin": DMI_PLUGIN_URL,
"createdCmHandles": cmHandleIds.map(cmHandleId => ({
"cmHandle": cmHandleId,
+ "alternateId": `alt-${cmHandleId}`,
"cmHandleProperties": {"neType": "RadioNode"},
"publicCmHandleProperties": {
"Color": "yellow",
diff --git a/k6-tests/ncmp/common/passthrough-crud.js b/k6-tests/ncmp/common/passthrough-crud.js
index 76bda4e1bd..5617f9d093 100644
--- a/k6-tests/ncmp/common/passthrough-crud.js
+++ b/k6-tests/ncmp/common/passthrough-crud.js
@@ -36,6 +36,16 @@ export function passthroughRead() {
return response;
}
+export function passthroughReadWithAltId() {
+ const cmHandleId = getRandomCmHandleId();
+ const resourceIdentifier = 'my-resource-identifier';
+ const includeDescendants = true;
+ const datastoreName = 'ncmp-datastore:passthrough-operational';
+ const url = `${NCMP_BASE_URL}/ncmp/v1/ch/alt-${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}&include-descendants=${includeDescendants}`
+ const response = http.get(url);
+ return response;
+}
+
export function passthroughWrite() {
const cmHandleId = getRandomCmHandleId();
const resourceIdentifier = 'my-resource-identifier';
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index f24edc50d6..b0e39c0867 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -66,6 +66,7 @@ export function makeCustomSummaryReport(data, options) {
makeSummaryCsvLine('4', 'CM-handle search with Module filter', 'milliseconds', 'http_req_duration{scenario:cm_search_module}', data, options),
makeSummaryCsvLine('5a', 'Synchronous single CM-handle pass-through read', 'requests/second', 'http_reqs{scenario:passthrough_read}', data, options),
makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read', 'milliseconds', 'ncmp_overhead_passthrough_read', data, options),
+ makeSummaryCsvLine('5c', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', data, options),
makeSummaryCsvLine('6a', 'Synchronous single CM-handle pass-through write', 'requests/second', 'http_reqs{scenario:passthrough_write}', data, options),
makeSummaryCsvLine('6b', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', data, options),
makeSummaryCsvLine('7', 'Data operations batch read', 'events/second', 'data_operations_batch_read_cmhandles_per_second', data, options),