diff options
author | halil.cakal <halil.cakal@est.tech> | 2024-09-03 15:38:01 +0100 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2024-09-13 09:46:13 +0100 |
commit | cca257663f6e09303591a9bf639436eb5c98cc2d (patch) | |
tree | b4c1e2e38f6cc9c8943db503e1d5dfafc2f36f07 | |
parent | fc49910404bf3868788e4b8d91d93047ce297f4d (diff) |
Add CPS limit to the plots
- as of now the cps limits given manually according to
the latest result
- there will be another commit will change the plot
job in cicd repo to reflect the values on the plots
Issue-ID: CPS-2350
Change-Id: Ic371f46894f1825dca1d26ec65ae0f62aa06c327
Signed-off-by: halil.cakal <halil.cakal@est.tech>
-rw-r--r-- | k6-tests/ncmp/common/utils.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js index 5d1905646d..8ee6d10123 100644 --- a/k6-tests/ncmp/common/utils.js +++ b/k6-tests/ncmp/common/utils.js @@ -81,27 +81,27 @@ export function performGetRequest(url, metricTag) { return http.get(url, {tags: metricTags}); } -export function makeCustomSummaryReport(data, options) { +export function makeCustomSummaryReport(testResults, scenarioConfig) { const summaryCsvLines = [ - '#,Test Name,Unit,Limit,Actual', - makeSummaryCsvLine('0', 'HTTP request failures for all tests', 'rate of failed requests', 'http_req_failed', data, options), - makeSummaryCsvLine('1', 'Registration of CM-handles', 'CM-handles/second', 'cmhandles_created_per_second', 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 and Property filter', 'milliseconds', 'id_search_duration', data, options), - makeSummaryCsvLine('4', 'CM-handle search with Module and Property filter', 'milliseconds', 'cm_search_duration', 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('6a', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', data, options), - makeSummaryCsvLine('6b', 'NCMP overhead for Synchronous single CM-handle pass-through write with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_write_alt_id', data, options), - makeSummaryCsvLine('7', 'Legacy batch read operation', 'events/second', 'legacy_batch_read_cmhandles_per_second', data, options), + '#,Test Name,Unit,Fs Requirement,Current Expectation,Actual', + makeSummaryCsvLine('0', 'HTTP request failures for all tests', 'rate of failed requests', 'http_req_failed', 0, testResults, scenarioConfig), + makeSummaryCsvLine('1', 'Registration of CM-handles', 'CM-handles/second', 'cmhandles_created_per_second', 110, testResults, scenarioConfig), + makeSummaryCsvLine('2', 'De-registration of CM-handles', 'CM-handles/second', 'cmhandles_deleted_per_second', 80, testResults, scenarioConfig), + makeSummaryCsvLine('3', 'CM-handle ID search with Module and Property filter', 'milliseconds', 'id_search_duration', 4000, testResults, scenarioConfig), + makeSummaryCsvLine('4', 'CM-handle search with Module and Property filter', 'milliseconds', 'cm_search_duration', 30000, testResults, scenarioConfig), + makeSummaryCsvLine('5a', 'NCMP overhead for Synchronous single CM-handle pass-through read', 'milliseconds', 'ncmp_overhead_passthrough_read', 40, testResults, scenarioConfig), + makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', 60, testResults, scenarioConfig), + makeSummaryCsvLine('6a', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', 30, testResults, scenarioConfig), + makeSummaryCsvLine('6b', 'NCMP overhead for Synchronous single CM-handle pass-through write with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_write_alt_id', 60, testResults, scenarioConfig), + makeSummaryCsvLine('7', 'Legacy batch read operation', 'events/second', 'legacy_batch_read_cmhandles_per_second', 1100, testResults, scenarioConfig), ]; return summaryCsvLines.join('\n') + '\n'; } -function makeSummaryCsvLine(testCase, testName, unit, thresholdInK6, data, options) { - const thresholdArray = JSON.parse(JSON.stringify(options.thresholds[thresholdInK6])); +function makeSummaryCsvLine(testCase, testName, unit, measurementName, currentExpectation, testResults, scenarioConfig) { + const thresholdArray = JSON.parse(JSON.stringify(scenarioConfig.thresholds[measurementName])); const thresholdString = thresholdArray[0]; const [thresholdKey, thresholdOperator, thresholdValue] = thresholdString.split(/\s+/); - const actualValue = data.metrics[thresholdInK6].values[thresholdKey].toFixed(3); - return `${testCase},${testName},${unit},${thresholdValue},${actualValue}`; + const actualValue = testResults.metrics[measurementName].values[thresholdKey].toFixed(3); + return `${testCase},${testName},${unit},${thresholdValue},${currentExpectation},${actualValue}`; } |