diff options
author | seanbeirne <sean.beirne@est.tech> | 2024-07-19 16:55:06 +0100 |
---|---|---|
committer | Priyank Maheshwari <priyank.maheshwari@est.tech> | 2024-08-12 13:41:31 +0000 |
commit | 285595282371807532862fa0293f6d5e3b5d3517 (patch) | |
tree | 1b3548153a3ec6c1be76241eb5107f4ea85390fa /k6-tests/ncmp/ncmp-kpi.js | |
parent | d3c1e7246ab4f41cf3dad97e559ca2736b0014cf (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/ncmp-kpi.js')
-rw-r--r-- | k6-tests/ncmp/ncmp-kpi.js | 17 |
1 files changed, 16 insertions, 1 deletions
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 }); |