aboutsummaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/3-passthrough-read.js
diff options
context:
space:
mode:
authorhalil.cakal <halil.cakal@est.tech>2024-05-27 16:06:59 +0100
committerhalil.cakal <halil.cakal@est.tech>2024-05-27 16:06:59 +0100
commit0613fbd654bacb9324e07bb2f9f4244302c48aaa (patch)
tree8fd4f5b3cfdac8f1baf59794395ac6bc9e2f6674 /k6-tests/ncmp/3-passthrough-read.js
parentc628542edebf7b000bc8646455378ae076bdc9c5 (diff)
Print summary report for K6 tests
- add a generic template to print summary of k6 test results - remove container logs since its around 50 mb Issue-ID: CPS-2215 Change-Id: I8971fc30b9dc8be2ed16eda6755d17a91f608b48 Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'k6-tests/ncmp/3-passthrough-read.js')
-rw-r--r--k6-tests/ncmp/3-passthrough-read.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/k6-tests/ncmp/3-passthrough-read.js b/k6-tests/ncmp/3-passthrough-read.js
index 912cee599..0b8c58a8c 100644
--- a/k6-tests/ncmp/3-passthrough-read.js
+++ b/k6-tests/ncmp/3-passthrough-read.js
@@ -21,21 +21,21 @@
import http from 'k6/http';
import { check } from 'k6';
import { Trend } from "k6/metrics";
-import { NCMP_BASE_URL, getRandomCmHandleId } from './utils.js'
+import { NCMP_BASE_URL, getRandomCmHandleId, makeCustomSummaryReport } from './utils.js'
let ncmpOverheadTrend = new Trend("ncmp_overhead");
export const options = {
- vus: 12,
- duration: '30s',
- thresholds: {
- http_req_failed: ['rate == 0'],
- ncmp_overhead: ['avg <= 40'],
- },
+ vus: 12,
+ duration: '30s',
+ thresholds: {
+ http_req_failed: ['rate == 0'],
+ ncmp_overhead: ['avg <= 40'],
+ },
};
// The function that defines VU logic.
-export default function() {
+export default function () {
const cmHandleId = getRandomCmHandleId();
const datastoreName = 'ncmp-datastore%3Apassthrough-operational';
const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=x&include-descendants=true`
@@ -49,3 +49,9 @@ export default function() {
const overhead = response.timings.duration - dmiDelay;
ncmpOverheadTrend.add(overhead);
}
+
+export function handleSummary(data) {
+ return {
+ stdout: makeCustomSummaryReport(data, options),
+ };
+} \ No newline at end of file