diff options
author | halil.cakal <halil.cakal@est.tech> | 2024-08-06 14:02:49 +0100 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2024-08-26 16:19:32 +0100 |
commit | 1745d2073c8ebca9e8c5384a9086a2170d7b90ec (patch) | |
tree | 86e0179a3d3732ada082d49fff24e8ead6ed7b0a /k6-tests/ncmp/common/utils.js | |
parent | 64ff45847a3466cb24a8dab57b65be753ee3cd03 (diff) |
Plot request failures for each k6 test
- add request failures to plot for each tests
- simplify setup and teardown function
Issue-ID: CPS-2347
Change-Id: I81226518af7bda12b0489ec46de08e27c96cc16d
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'k6-tests/ncmp/common/utils.js')
-rw-r--r-- | k6-tests/ncmp/common/utils.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js index 294789f940..88da750e2b 100644 --- a/k6-tests/ncmp/common/utils.js +++ b/k6-tests/ncmp/common/utils.js @@ -30,13 +30,6 @@ export const TOPIC_DATA_OPERATIONS_BATCH_READ = 'topic-data-operations-batch-rea export const KAFKA_BOOTSTRAP_SERVERS = ['localhost:9092']; export const MODULE_SET_TAGS = ['tagA','tagB','tagC',' tagD'] -export function recordTimeInSeconds(functionToExecute) { - const startTimeInMillis = Date.now(); - functionToExecute(); - const endTimeInMillis = Date.now(); - const totalTimeInSeconds = (endTimeInMillis - startTimeInMillis) / 1000.0; - return totalTimeInSeconds; -} /** * Generates a batch of CM-handle IDs based on batch size and number. @@ -69,6 +62,14 @@ export function makeCustomSummaryReport(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), + makeSummaryCsvLine('1x', 'Failures of Registration of CM-handles', 'number of failed requests', 'http_req_failed{group:::setup}', data, options), + makeSummaryCsvLine('2x', 'Failures of De-registration of CM-handles', 'number of failed requests', 'http_req_failed{group:::teardown}', data, options), + makeSummaryCsvLine('3x', 'Failures of CM-handle ID search with Module filter', 'number of failed requests', 'http_req_failed{scenario:id_search_module}', data, options), + makeSummaryCsvLine('4x', 'Failures of CM-handle search with Module filter', 'number of failed requests', 'http_req_failed{scenario:cm_search_module}', data, options), + makeSummaryCsvLine('5x', 'Failures of Synchronous single CM-handle pass-through read', 'number of failed requests', 'http_req_failed{scenario:passthrough_read}', data, options), + makeSummaryCsvLine('6x', 'Failures of Synchronous single CM-handle pass-through write', 'number of failed requests', 'http_req_failed{scenario:passthrough_write}', data, options), + makeSummaryCsvLine('7ax', 'Failures of Data operations batch read', 'number of failed requests', 'http_req_failed{scenario:data_operation_send_async_http_request}', data, options), + makeSummaryCsvLine('7bx', 'Failures of Data operations batch read consume kafka responses', 'number of failed requests', 'kafka_reader_error_count{scenario:data_operation_consume_kafka_responses}', data, options), ]; return summaryCsvLines.join('\n') + '\n'; } |