summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/common/utils.js
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2024-06-12 16:50:07 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-06-14 16:18:19 +0100
commitcb8ba8329d04ec7f43878107884c0fddc595fd82 (patch)
tree224e1e32f8cc391464f0d8f03b32d81da4a48b72 /k6-tests/ncmp/common/utils.js
parentf66694a076be41d83693423dec818493bcf66715 (diff)
[k6] Add JVM warmup phase (#2)
To account for JVM warmup effect, the k6 test suite is run twice: initially, the whole test suite is run without recording results. - Added environment variables to allow setting total CM-handles and batch size for registration. By reducing total CM-handles during warm-up, many more operations will be run. Issue-ID: CPS-2264 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib1d1e76d31719d788a3e026797faa0a425b320a2
Diffstat (limited to 'k6-tests/ncmp/common/utils.js')
-rw-r--r--k6-tests/ncmp/common/utils.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index 1fb9b8e670..55ef60a2e7 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -20,7 +20,8 @@
export const NCMP_BASE_URL = 'http://localhost:8883';
export const DMI_PLUGIN_URL = 'http://ncmp-dmi-plugin-demo-and-csit-stub:8092';
-export const TOTAL_CM_HANDLES = 20000
+export const TOTAL_CM_HANDLES = Number(__ENV.TOTAL_CM_HANDLES) || 20000;
+export const REGISTRATION_BATCH_SIZE = Number(__ENV.REGISTRATION_BATCH_SIZE) || 100;
/**
* Generates a batch of CM-handle IDs based on batch size and number.