aboutsummaryrefslogtreecommitdiffstats
path: root/k6-tests
diff options
context:
space:
mode:
Diffstat (limited to 'k6-tests')
-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
-rw-r--r--k6-tests/ncmp/ncmp-kpi.js17
4 files changed, 28 insertions, 1 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),
diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js
index 8ff9ec50b4..d7e4405393 100644
--- a/k6-tests/ncmp/ncmp-kpi.js
+++ b/k6-tests/ncmp/ncmp-kpi.js
@@ -27,7 +27,7 @@ import {
} from './common/utils.js';
import { registerAllCmHandles, deregisterAllCmHandles } from './common/cmhandle-crud.js';
import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
-import { passthroughRead, passthroughWrite, batchRead } from './common/passthrough-crud.js';
+import { passthroughRead, passthroughReadWithAltId, passthroughWrite, batchRead } from './common/passthrough-crud.js';
import {
Reader,
} from 'k6/x/kafka';
@@ -35,6 +35,7 @@ import {
let cmHandlesCreatedPerSecondGauge = new Gauge('cmhandles_created_per_second');
let cmHandlesDeletedPerSecondGauge = new Gauge('cmhandles_deleted_per_second');
let passthroughReadNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_read');
+let passthroughReadNcmpOverheadTrendWithAlternateId = new Trend('ncmp_overhead_passthrough_read_alt_id');
let passthroughWriteNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_write');
let dataOperationsBatchReadCmHandlePerSecondTrend = new Trend('data_operations_batch_read_cmhandles_per_second');
@@ -55,6 +56,12 @@ export const options = {
vus: 10,
duration: DURATION,
},
+ passthrough_read_alt_id: {
+ executor: 'constant-vus',
+ exec: 'passthrough_read_alt_id',
+ vus: 1,
+ duration: DURATION,
+ },
passthrough_write: {
executor: 'constant-vus',
exec: 'passthrough_write',
@@ -96,6 +103,7 @@ export const options = {
'http_reqs{scenario:passthrough_write}': ['rate >= 13'],
'http_reqs{scenario:passthrough_read}': ['rate >= 25'],
'ncmp_overhead_passthrough_read': ['avg <= 100'],
+ 'ncmp_overhead_passthrough_read_alt_id': ['avg <= 100'],
'ncmp_overhead_passthrough_write': ['avg <= 100'],
'http_req_duration{scenario:id_search_module}': ['avg <= 625'],
'http_req_duration{scenario:cm_search_module}': ['avg <= 13000'],
@@ -126,6 +134,13 @@ export function passthrough_read() {
passthroughReadNcmpOverheadTrend.add(overhead);
}
+export function passthrough_read_alt_id() {
+ const response = passthroughReadWithAltId();
+ check(response, { 'passthrough read with alternate Id status equals 200': (r) => r.status === 200 });
+ const overhead = response.timings.duration - READ_DATA_FOR_CM_HANDLE_DELAY_MS;
+ passthroughReadNcmpOverheadTrendWithAlternateId.add(overhead);
+}
+
export function passthrough_write() {
const response = passthroughWrite();
check(response, { 'passthrough write status equals 201': (r) => r.status === 201 });