CPS-2794 Improving KPI test error logging
Limitations
Limitation | What does this mean to us | |
|---|---|---|
| 1 | Stopping one scenario in k6 test run is not supported
|
|
| 2 | Each VU has its own states and cannot access other VUs states (no shared mutable state) as it runs on its own JS runtime |
|
| 3 | Environmental variables are read only for each VU |
|
| 4 | Threshold metrics are only evaluated after the k6 test run |
|
Options
Note: Options below does not include use of an external client to output logs to or to create a shared variable
Option Description | Pros | Cons | Notes | |
|---|---|---|---|---|
| 1 | Use
|
|
|
|
| 2 | Use
|
|
|
|
| 3 | Use Sample result
|
|
|
|
| 4 | Limiting error log counts per VUs i.e. each VU iteration set limit = 5
set countedErrors = 0
check countedErrors
if countedErrors > limit then
do rest call
countedErrors++
if countedErrors == limit then
log ‘next iteration aborted …’
else do nothing or fail() |
|
|
|
| 5 | Use
Below example shows that for an error limit of 5 per VU - when one VU reach its limit, whole k6 test run is cancelled. The action is logged at an error level and detail of which test caused it. |
|
| Would be great if a shared mutable variable between VUs is available |
| 6 | Combination of the following:
|
|
|
|
Note: for constant-arrival-rate , maxVus = preAllocatedVUs if maxVus is not set (Constant arrival rate | Grafana k6 documentation)
Scenario | KPI Scenario Properties | Iterations | Error limit per VU |
| Notes | |
|---|---|---|---|---|---|---|
| 1 | Registration of CM-handles |
|
|
|
|
|
| 2 | De-registration of CM-handles |
|
|
|
|
|
| 3 | CM-handle ID search with No filter | "cm_handle_id_search_nofilter_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleIdSearchNoFilterScenario",
"rate": 1,
"timeUnit": "2600ms",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "0ms"
}, | ~ 346 | 5 |
|
|
| 4 | CM-handle ID search with Module filter | "cm_handle_id_search_module_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleIdSearchModuleScenario",
"rate": 1,
"timeUnit": "2600ms",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "400ms"
}, | ~ 346 | 5 |
|
|
| 5 | CM-handle ID search with Property filter | "cm_handle_id_search_property_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleIdSearchPropertyScenario",
"rate": 1,
"timeUnit": "2600ms",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "800ms"
}, | ~ 346 | 5 |
|
|
| 6 | CM-handle ID search with Cps Path filter | "cm_handle_id_search_cpspath_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleIdSearchCpsPathScenario",
"rate": 1,
"timeUnit": "2600ms",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "1200ms"
}, | ~ 346 | 5 |
|
|
| 7 | CM-handle ID search with Trust Level filter | "cm_handle_id_search_trustlevel_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleIdSearchTrustLevelScenario",
"rate": 1,
"timeUnit": "2600ms",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "1600ms"
}, | ~ 346 | 5 |
|
|
| 8 | CM-handle search with No filter | "cm_handle_search_nofilter_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleSearchNoFilterScenario",
"rate": 1,
"timeUnit": "24s",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "0s"
}, | ~ 37 | 5 |
|
|
| 9 | CM-handle search with Module filter | "cm_handle_search_module_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleSearchModuleScenario",
"rate": 1,
"timeUnit": "24s",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "3s"
}, | ~ 37 | 5 |
|
|
| 10 | CM-handle search with Property filter | "cm_handle_search_property_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleSearchPropertyScenario",
"rate": 1,
"timeUnit": "24s",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "6s"
}, | ~ 37 | 5 |
|
|
| 11 | CM-handle search with Cps Path filter | "cm_handle_search_cpspath_scenario": {
"executor": "constant-arrival-rate",
"exec": "cmHandleSearchCpsPathScenario",
"rate": 1,
"timeUnit": "24s",
"duration": "15m",
"preAllocatedVUs": 2,
"startTime": "9s"
}, | ~ 37 | 5 |
|
|
| 12 | NCMP overhead for Synchronous single CM-handle pass-through read with alternate id | "passthrough_read_alt_id_scenario": {
"executor": "constant-arrival-rate",
"exec": "passthroughReadAltIdScenario",
"rate": 25,
"timeUnit": "1s",
"duration": "15m",
"preAllocatedVUs": 5,
"maxVUs": 25,
"startTime": "200ms"
}, | ~ 22,500 | 5 |
|
|
| 13 | NCMP overhead for Synchronous single CM-handle pass-through write with alternate id | "passthrough_write_alt_id_scenario": {
"executor": "constant-arrival-rate",
"exec": "passthroughWriteAltIdScenario",
"rate": 13,
"timeUnit": "1s",
"duration": "15m",
"preAllocatedVUs": 5,
"maxVUs": 25,
"startTime": "600ms"
}, | ~ 11,700 | 5 |
|
|
| 14 | Legacy batch read operation | "legacy_batch_consume_scenario": {
"executor": "per-vu-iterations",
"exec": "legacyBatchConsumeScenario",
"vus": 1,
"iterations": 1,
"maxDuration": "16m"
}, | 1 | 1 |
|
|
| 15 |
| "produceCmAvcBackGroundLoadAtPeakRate": {
"executor": "constant-arrival-rate",
"exec": "produceAvcEventsScenario",
"rate": 11,
"timeUnit": "1s",
"duration": "15m",
"preAllocatedVUs": 11,
"maxVUs": 12,
"gracefulStop": "10s"
} | ~ 9,900 | - |
|
|
error limit on endurance tests ?
Scenario | Endurance Scenario Properties | Iterations | Error limit per VU |
| Notes | |
|---|---|---|---|---|---|---|
| 1 | Registration of CM-handles |
|
|
|
|
|
| 2 | De-registration of CM-handles |
|
|
|
|
|
| 3 | CM-handle ID search with No filter | "cm_handle_id_search_nofilter_scenario": {
"executor": "constant-vus",
"exec": "cmHandleIdSearchNoFilterScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 4 | CM-handle ID search with Module filter | "cm_handle_id_search_module_scenario": {
"executor": "constant-vus",
"exec": "cmHandleIdSearchModuleScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 5 | CM-handle ID search with Property filter | "cm_handle_id_search_property_scenario": {
"executor": "constant-vus",
"exec": "cmHandleIdSearchPropertyScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 6 | CM-handle ID search with Cps Path filter | "cm_handle_id_search_cpspath_scenario": {
"executor": "constant-vus",
"exec": "cmHandleIdSearchCpsPathScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 7 | CM-handle ID search with Trust Level filter | "cm_handle_id_search_trustlevel_scenario": {
"executor": "constant-vus",
"exec": "cmHandleIdSearchTrustLevelScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 8 | CM-handle search with No filter | "cm_handle_search_nofilter_scenario": {
"executor": "constant-vus",
"exec": "cmHandleSearchNoFilterScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 9 | CM-handle search with Module filter | "cm_handle_search_module_scenario": {
"executor": "constant-vus",
"exec": "cmHandleSearchModuleScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 10 | CM-handle search with Property filter | "cm_handle_search_property_scenario": {
"executor": "constant-vus",
"exec": "cmHandleSearchPropertyScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 11 | CM-handle search with Cps Path filter | "cm_handle_search_cpspath_scenario": {
"executor": "constant-vus",
"exec": "cmHandleSearchCpsPathScenario",
"vus": 1,
"duration": "2h"
}, |
|
|
|
|
| 12 | NCMP overhead for Synchronous single CM-handle pass-through read with alternate id | "passthrough_read_alt_id_scenario": {
"executor": "constant-vus",
"exec": "passthroughReadAltIdScenario",
"vus": 4,
"duration": "2h"
}, |
|
|
|
|
| 13 | NCMP overhead for Synchronous single CM-handle pass-through write with alternate id | "passthrough_write_alt_id_scenario": {
"executor": "constant-vus",
"exec": "passthroughWriteAltIdScenario",
"vus": 4,
"duration": "2h"
}, |
|
|
|
|
| 14 | Legacy batch produce operation | "legacy_batch_produce_scenario": {
"executor": "constant-arrival-rate",
"exec": "legacyBatchProduceScenario",
"duration": "2h",
"rate": 1,
"timeUnit": "1s",
"preAllocatedVUs": 1
} |
|
|
|
|