export const KAFKA_BOOTSTRAP_SERVERS = testConfig.hosts.kafkaBootstrapServer;
export const NCMP_BASE_URL = testConfig.hosts.ncmpBaseUrl;
export const DMI_PLUGIN_URL = testConfig.hosts.dmiStubUrl;
+export const CONTAINER_UP_TIME_IN_SECONDS = testConfig.hosts.containerUpTimeInSeconds;
export const LEGACY_BATCH_TOPIC_NAME = 'legacy_batch_topic';
export const TOTAL_CM_HANDLES = 20000;
export const REGISTRATION_BATCH_SIZE = 100;
"hosts": {
"ncmpBaseUrl": "http://localhost:8884",
"dmiStubUrl": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092",
- "kafkaBootstrapServer": "localhost:9093"
+ "kafkaBootstrapServer": "localhost:9093",
+ "containerUpTimeInSeconds": 420
},
"scenarios": {
"passthrough_read_scenario": {
"hosts": {
"ncmpBaseUrl": "http://localhost:8883",
"dmiStubUrl": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092",
- "kafkaBootstrapServer": "localhost:9092"
+ "kafkaBootstrapServer": "localhost:9092",
+ "containerUpTimeInSeconds": 300
},
"scenarios": {
"passthrough_read_scenario": {
* ============LICENSE_END=========================================================
*/
-import { check } from 'k6';
+import { check, sleep } from 'k6';
import { Trend } from 'k6/metrics';
import { Reader } from 'k6/x/kafka';
import {
TOTAL_CM_HANDLES, READ_DATA_FOR_CM_HANDLE_DELAY_MS, WRITE_DATA_FOR_CM_HANDLE_DELAY_MS,
makeCustomSummaryReport, makeBatchOfCmHandleIds, LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE,
REGISTRATION_BATCH_SIZE, LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS, KAFKA_BOOTSTRAP_SERVERS,
- LEGACY_BATCH_TOPIC_NAME, testConfig
+ LEGACY_BATCH_TOPIC_NAME, CONTAINER_UP_TIME_IN_SECONDS, testConfig
} from './common/utils.js';
import { createCmHandles, deleteCmHandles, waitForAllCmHandlesToBeReady } from './common/cmhandle-crud.js';
import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
const totalDeregistrationTimeInSeconds = (endTimeInMillis - startTimeInMillis) / 1000.0;
cmHandlesDeletedPerSecondTrend.add(DEREGISTERED_CM_HANDLES / totalDeregistrationTimeInSeconds);
+
+ sleep(CONTAINER_UP_TIME_IN_SECONDS);
}
export function passthroughReadScenario() {