summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/common
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2024-09-21 16:47:43 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-09-24 16:57:59 +0100
commita9de166ce7d58b4ccabbd1d586a2ee9dc3b878e8 (patch)
tree3b1a0b403090e6f4c2e0292bbf03de395d536fd2 /k6-tests/ncmp/common
parent06391e2c0b13064caa643bd9f44e773eaeeb2631 (diff)
[k6] CM handles searches using different filters
Each 5 VUs for searches uses a different filter: no filter, module, property, cps path, and trust level. This is needed since each search may have different performance. This also helps reduce load versus doing a combined module and property search all the time. Issue-ID: CPS-2349 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I33a75260f97697d2061d10b80ba7eeb2f6c346f5
Diffstat (limited to 'k6-tests/ncmp/common')
-rw-r--r--k6-tests/ncmp/common/cmhandle-crud.js2
-rw-r--r--k6-tests/ncmp/common/search-base.js21
-rw-r--r--k6-tests/ncmp/common/utils.js12
3 files changed, 29 insertions, 6 deletions
diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
index 7fab62abd8..0fea1a44f2 100644
--- a/k6-tests/ncmp/common/cmhandle-crud.js
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -66,7 +66,7 @@ function createCmHandlePayload(cmHandleIds) {
}
function getNumberOfReadyCmHandles() {
- const response = executeCmHandleIdSearch('readyCmHandles');
+ const response = executeCmHandleIdSearch('cps-path-for-ready-cm-handles');
const arrayOfCmHandleIds = JSON.parse(response.body);
return arrayOfCmHandleIds.length;
}
diff --git a/k6-tests/ncmp/common/search-base.js b/k6-tests/ncmp/common/search-base.js
index a6424fe5d0..1e98e9b07b 100644
--- a/k6-tests/ncmp/common/search-base.js
+++ b/k6-tests/ncmp/common/search-base.js
@@ -36,19 +36,34 @@ function executeSearchRequest(searchType, scenario) {
}
const SEARCH_PARAMETERS_PER_SCENARIO = {
- "module-and-properties": {
+ "no-filter": {
+ "cmHandleQueryParameters": []
+ },
+ "module": {
"cmHandleQueryParameters": [
{
"conditionName": "hasAllModules",
"conditionParameters": [{"moduleName": "ietf-yang-types"}]
- },
+ }
+ ]
+ },
+ "property": {
+ "cmHandleQueryParameters": [
{
"conditionName": "hasAllProperties",
"conditionParameters": [{"Color": "yellow"}]
}
]
},
- "readyCmHandles": {
+ "trust-level": {
+ "cmHandleQueryParameters": [
+ {
+ "conditionName": "cmHandleWithTrustLevel",
+ "conditionParameters": [ {"trustLevel": "COMPLETE"} ]
+ }
+ ]
+ },
+ "cps-path-for-ready-cm-handles": {
"cmHandleQueryParameters": [
{
"conditionName": "cmHandleWithCpsPath",
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index 8ee6d10123..b52866c3fb 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -87,8 +87,16 @@ export function makeCustomSummaryReport(testResults, scenarioConfig) {
makeSummaryCsvLine('0', 'HTTP request failures for all tests', 'rate of failed requests', 'http_req_failed', 0, testResults, scenarioConfig),
makeSummaryCsvLine('1', 'Registration of CM-handles', 'CM-handles/second', 'cmhandles_created_per_second', 110, testResults, scenarioConfig),
makeSummaryCsvLine('2', 'De-registration of CM-handles', 'CM-handles/second', 'cmhandles_deleted_per_second', 80, testResults, scenarioConfig),
- makeSummaryCsvLine('3', 'CM-handle ID search with Module and Property filter', 'milliseconds', 'id_search_duration', 4000, testResults, scenarioConfig),
- makeSummaryCsvLine('4', 'CM-handle search with Module and Property filter', 'milliseconds', 'cm_search_duration', 30000, testResults, scenarioConfig),
+ makeSummaryCsvLine('3a', 'CM-handle ID search with No filter', 'milliseconds', 'id_search_nofilter_duration', 4000, testResults, scenarioConfig),
+ makeSummaryCsvLine('3b', 'CM-handle ID search with Module filter', 'milliseconds', 'id_search_module_duration', 4000, testResults, scenarioConfig),
+ makeSummaryCsvLine('3c', 'CM-handle ID search with Property filter', 'milliseconds', 'id_search_property_duration', 4000, testResults, scenarioConfig),
+ makeSummaryCsvLine('3d', 'CM-handle ID search with Cps Path filter', 'milliseconds', 'id_search_cpspath_duration', 4000, testResults, scenarioConfig),
+ makeSummaryCsvLine('3e', 'CM-handle ID search with Trust Level filter', 'milliseconds', 'id_search_trustlevel_duration', 4000, testResults, scenarioConfig),
+ makeSummaryCsvLine('4a', 'CM-handle search with No filter', 'milliseconds', 'cm_search_nofilter_duration', 30000, testResults, scenarioConfig),
+ makeSummaryCsvLine('4b', 'CM-handle search with Module filter', 'milliseconds', 'cm_search_module_duration', 30000, testResults, scenarioConfig),
+ makeSummaryCsvLine('4c', 'CM-handle search with Property filter', 'milliseconds', 'cm_search_property_duration', 30000, testResults, scenarioConfig),
+ makeSummaryCsvLine('4d', 'CM-handle search with Cps Path filter', 'milliseconds', 'cm_search_cpspath_duration', 30000, testResults, scenarioConfig),
+ makeSummaryCsvLine('4e', 'CM-handle search with Trust Level filter', 'milliseconds', 'cm_search_trustlevel_duration', 30000, testResults, scenarioConfig),
makeSummaryCsvLine('5a', 'NCMP overhead for Synchronous single CM-handle pass-through read', 'milliseconds', 'ncmp_overhead_passthrough_read', 40, testResults, scenarioConfig),
makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', 60, testResults, scenarioConfig),
makeSummaryCsvLine('6a', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', 30, testResults, scenarioConfig),