diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2024-07-16 11:47:24 +0100 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2024-07-18 12:53:54 +0100 |
commit | dbe7b6675c05a512f50a8282af1eb8edd811fce6 (patch) | |
tree | f35e097f9afc269aea933cfc3e6fbd41d949deb3 /k6-tests/ncmp/ncmp-kpi.js | |
parent | 36437900e9b56e798b1397b9f5392ef603d50269 (diff) |
[k6] Measure NCMP overhead for passthrough operations
Measure NCMP overhead by subtracting DMI delay from request duration.
Issue-ID: CPS-2269
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ieb4758e9f7cab119da4c28e4a3febfa1361b2613
Diffstat (limited to 'k6-tests/ncmp/ncmp-kpi.js')
-rw-r--r-- | k6-tests/ncmp/ncmp-kpi.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js index 6bf0568077..96c6263d32 100644 --- a/k6-tests/ncmp/ncmp-kpi.js +++ b/k6-tests/ncmp/ncmp-kpi.js @@ -19,14 +19,17 @@ */ import { check } from 'k6'; -import { Gauge } from 'k6/metrics'; -import { TOTAL_CM_HANDLES, makeCustomSummaryReport, recordTimeInSeconds } from './common/utils.js'; +import { Gauge, Trend } from 'k6/metrics'; +import { TOTAL_CM_HANDLES, READ_DATA_FOR_CM_HANDLE_DELAY_MS, WRITE_DATA_FOR_CM_HANDLE_DELAY_MS, + makeCustomSummaryReport, recordTimeInSeconds } from './common/utils.js'; import { registerAllCmHandles, deregisterAllCmHandles } from './common/cmhandle-crud.js'; import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js'; import { passthroughRead, passthroughWrite } from './common/passthrough-crud.js'; 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 passthroughWriteNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_write'); const DURATION = '15m'; @@ -64,10 +67,14 @@ export const options = { 'cmhandles_deleted_per_second': ['value >= 22'], 'http_reqs{scenario:passthrough_write}': ['rate >= 13'], 'http_reqs{scenario:passthrough_read}': ['rate >= 25'], - 'http_req_failed{scenario:id_search_module}': ['rate == 0'], - 'http_req_failed{scenario:cm_search_module}': ['rate == 0'], + 'ncmp_overhead_passthrough_read': ['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'], + 'http_req_failed{scenario:id_search_module}': ['rate == 0'], + 'http_req_failed{scenario:cm_search_module}': ['rate == 0'], + 'http_req_failed{scenario:passthrough_read}': ['rate == 0'], + 'http_req_failed{scenario:passthrough_write}': ['rate == 0'], }, }; @@ -84,11 +91,15 @@ export function teardown() { export function passthrough_read() { const response = passthroughRead(); check(response, { 'passthrough read status equals 200': (r) => r.status === 200 }); + const overhead = response.timings.duration - READ_DATA_FOR_CM_HANDLE_DELAY_MS; + passthroughReadNcmpOverheadTrend.add(overhead); } export function passthrough_write() { const response = passthroughWrite(); check(response, { 'passthrough write status equals 200': (r) => r.status === 200 }); + const overhead = response.timings.duration - WRITE_DATA_FOR_CM_HANDLE_DELAY_MS; + passthroughWriteNcmpOverheadTrend.add(overhead); } export function id_search_module() { |