diff options
author | egernug <gerard.nugent@est.tech> | 2024-09-06 12:09:31 +0100 |
---|---|---|
committer | Daniel Hanrahan <daniel.hanrahan@est.tech> | 2024-09-10 18:53:36 +0000 |
commit | 2bdef267963c83509590b5c895f93380545720aa (patch) | |
tree | 06fda26d90ade6379373ada971aa467ad6a95796 /k6-tests | |
parent | c6a75c4ce6b6e041f2e91b5d4fb64cae6de6c0ab (diff) |
[k6] Fix incorrect results when errors occur in k6 tests (case 2)
De-registration is reported as 200,000 handles per second if all operations fail
- Added a running total for successful de-registrations of CM Handles
Issue-ID: CPS-2346
Change-Id: Ib4302d3b605ff1eaf4ecadac11b4e851a69210df
Signed-off-by: egernug <gerard.nugent@est.tech>
Diffstat (limited to 'k6-tests')
-rw-r--r-- | k6-tests/ncmp/ncmp-kpi.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js index ef3d0c60de..1d084f21e3 100644 --- a/k6-tests/ncmp/ncmp-kpi.js +++ b/k6-tests/ncmp/ncmp-kpi.js @@ -139,17 +139,21 @@ export function setup() { export function teardown() { const startTimeInMillis = Date.now(); + let DEREGISTERED_CM_HANDLES = 0 const TOTAL_BATCHES = Math.ceil(TOTAL_CM_HANDLES / REGISTRATION_BATCH_SIZE); for (let batchNumber = 0; batchNumber < TOTAL_BATCHES; batchNumber++) { const nextBatchOfCmHandleIds = makeBatchOfCmHandleIds(REGISTRATION_BATCH_SIZE, batchNumber); const response = deleteCmHandles(nextBatchOfCmHandleIds); + if (response.error_code === 0) { + DEREGISTERED_CM_HANDLES += REGISTRATION_BATCH_SIZE + } check(response, { 'delete CM-handles status equals 200': (r) => r.status === 200 }); } const endTimeInMillis = Date.now(); const totalDeregistrationTimeInSeconds = (endTimeInMillis - startTimeInMillis) / 1000.0; - cmHandlesDeletedPerSecondTrend.add(TOTAL_CM_HANDLES / totalDeregistrationTimeInSeconds); + cmHandlesDeletedPerSecondTrend.add(DEREGISTERED_CM_HANDLES / totalDeregistrationTimeInSeconds); } export function executePassthroughReadScenario() { |