From: danielhanrahan Date: Fri, 16 Aug 2024 10:09:25 +0000 (+0100) Subject: [k6] Remove incorrect passthrough rates X-Git-Tag: 3.5.2~12^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a1cdf7391a5d59cf5e9bcba1b4ac8abd585adbf7;p=cps.git [k6] Remove incorrect passthrough rates Reported rates for passthrough operations is incorrectly reported, due to it being averaged over whole test time including setup and teardown. It was agreed to simply not report rates, and only report NCMP overhead. - remove http request rates for passthrough operations - change VUs from passthrough read so that there are 10 total Issue-ID: CPS-2264 Signed-off-by: danielhanrahan Change-Id: Ida498955e69dffb332d6efeb8a8d73343565f9a1 --- diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js index 58c958dce0..294789f940 100644 --- a/k6-tests/ncmp/common/utils.js +++ b/k6-tests/ncmp/common/utils.js @@ -65,11 +65,9 @@ export function makeCustomSummaryReport(data, options) { makeSummaryCsvLine('2', 'De-registration of CM-handles', 'CM-handles/second', 'cmhandles_deleted_per_second', data, options), makeSummaryCsvLine('3', 'CM-handle ID search with Module filter', 'milliseconds', 'http_req_duration{scenario:id_search_module}', 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('5a', 'NCMP overhead for Synchronous single CM-handle pass-through read', 'milliseconds', 'ncmp_overhead_passthrough_read', data, options), + makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', data, options), + makeSummaryCsvLine('6', '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), ]; return summaryCsvLines.join('\n') + '\n'; diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js index d7e4405393..f4a44dba68 100644 --- a/k6-tests/ncmp/ncmp-kpi.js +++ b/k6-tests/ncmp/ncmp-kpi.js @@ -20,6 +20,7 @@ import { check } from 'k6'; import { Gauge, Trend } from 'k6/metrics'; +import { Reader } from 'k6/x/kafka'; import { TOTAL_CM_HANDLES, READ_DATA_FOR_CM_HANDLE_DELAY_MS, WRITE_DATA_FOR_CM_HANDLE_DELAY_MS, makeCustomSummaryReport, recordTimeInSeconds, makeBatchOfCmHandleIds, DATA_OPERATION_READ_BATCH_SIZE, @@ -28,15 +29,12 @@ import { import { registerAllCmHandles, deregisterAllCmHandles } from './common/cmhandle-crud.js'; import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js'; import { passthroughRead, passthroughReadWithAltId, passthroughWrite, batchRead } from './common/passthrough-crud.js'; -import { - Reader, -} from 'k6/x/kafka'; 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 passthroughReadNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_read', true); +let passthroughReadNcmpOverheadTrendWithAlternateId = new Trend('ncmp_overhead_passthrough_read_alt_id', true); +let passthroughWriteNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_write', true); let dataOperationsBatchReadCmHandlePerSecondTrend = new Trend('data_operations_batch_read_cmhandles_per_second'); const reader = new Reader({ @@ -53,7 +51,7 @@ export const options = { passthrough_read: { executor: 'constant-vus', exec: 'passthrough_read', - vus: 10, + vus: 9, duration: DURATION, }, passthrough_read_alt_id: { @@ -100,8 +98,6 @@ export const options = { thresholds: { 'cmhandles_created_per_second': ['value >= 22'], 'cmhandles_deleted_per_second': ['value >= 22'], - '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'],