Skip to content

Commit

Permalink
chore: some improvements and config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayg10 committed Aug 8, 2023
1 parent 785d7fb commit 03f052f
Show file tree
Hide file tree
Showing 11 changed files with 588 additions and 101 deletions.
31 changes: 20 additions & 11 deletions docker-compose-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ services:
## Services for Transfer tests
central-ledger:
image: mojaloop/central-ledger:${CENTRAL_LEDGER_VERSION}
scale: 1
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/central-ledger-disabled-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js central-ledger && node src/api/index.js"
# ports:
# - "3001:3001"
Expand Down Expand Up @@ -131,6 +132,7 @@ services:

central-handler-prepare:
image: mojaloop/central-ledger:${CENTRAL_LEDGER_VERSION}
scale: 2
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/central-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js central-ledger && node src/handlers/index.js handler --prepare"
# ports:
# - "3001:3001"
Expand Down Expand Up @@ -169,6 +171,7 @@ services:

central-handler-position:
image: mojaloop/central-ledger:${CENTRAL_LEDGER_VERSION}
scale: 8
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/central-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js central-ledger && node src/handlers/index.js handler --position"
# ports:
# - "3001:3001"
Expand Down Expand Up @@ -207,6 +210,7 @@ services:

central-handler-fulfil:
image: mojaloop/central-ledger:${CENTRAL_LEDGER_VERSION}
scale: 2
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/central-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js central-ledger && node src/handlers/index.js handler --fulfil"
# ports:
# - "3001:3001"
Expand Down Expand Up @@ -322,6 +326,7 @@ services:

central-handler-admin:
image: mojaloop/central-ledger:${CENTRAL_LEDGER_VERSION}
scale: 2
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/central-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js central-ledger && node src/handlers/index.js handler --admin"
# ports:
# - "3001:3001"
Expand Down Expand Up @@ -384,6 +389,8 @@ services:
networks:
- mojaloop-net
image: docker.io/bitnami/kafka:3.4.0
env_file:
- perf.env
depends_on:
- kafka
entrypoint: [ '/bin/sh', '-c' ]
Expand All @@ -392,16 +399,16 @@ services:
# blocks until kafka is reachable
kafka-topics.sh --bootstrap-server kafka:29092 --list
echo -e 'Creating kafka topics'
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-prepare --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-position --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-fulfil --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-notification-event --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-get --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-admin-transfer --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-prepare --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-fulfil --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-processing --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-get --replication-factor 1 --partitions 1
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-prepare --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-position --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-fulfil --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-notification-event --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-transfer-get --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-admin-transfer --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
# kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-prepare --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
# kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-fulfil --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
# kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-processing --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
# kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic topic-bulk-get --replication-factor 1 --partitions $$KAFKA_PARTITIONS_NUM
echo -e 'Successfully created the following topics:'
kafka-topics.sh --bootstrap-server kafka:29092 --list
"
Expand Down Expand Up @@ -483,7 +490,8 @@ services:

ml-api-adapter:
image: mojaloop/ml-api-adapter:${ML_API_ADAPTER_VERSION}
container_name: ml-api-adapter
scale: 2
# container_name: ml-api-adapter
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/ml-api-adapter-disabled-handlers.js /opt/app/config/default.json && /opt/app/wait4/wait4.js ml-api-adapter && node src/api/index.js"
# ports:
# - "3000:3000"
Expand Down Expand Up @@ -516,6 +524,7 @@ services:

ml-handler-notification:
image: mojaloop/ml-api-adapter:${ML_API_ADAPTER_VERSION}
scale: 4
command: sh -c "/opt/app/config-modifier/run.js /opt/app/config/default.json /opt/app/config-modifier/configs/ml-handler-notification.js /opt/app/config/default.json && /opt/app/wait4/wait4.js ml-api-adapter && node src/handlers/index.js handler --notification"
# ports:
# - "3000:3000"
Expand Down
90 changes: 47 additions & 43 deletions docker/grafana/provisioning/dashboards/dashboard-k6-monitoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"title": "Image render",
"tooltip": "Image Render",
"type": "link",
"url": "/render/d/${__dashboard.uid}/${__dashboard}?height=4500&width=4000"
"url": "/render/d/${__dashboard.uid}/${__dashboard}?height=5000&width=4000"
}
],
"liveNow": true,
Expand Down Expand Up @@ -918,18 +918,11 @@
"value": "ops"
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": ""
},
"properties": []
}
]
},
"gridPos": {
"h": 17,
"h": 28,
"w": 24,
"x": 0,
"y": 6
Expand Down Expand Up @@ -962,9 +955,9 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "builder",
"editorMode": "code",
"exemplar": false,
"expr": "k6_vus{testid=~\"$testid\"}",
"expr": "avg by(testid) (k6_vus{testid=~\"$testid\"})",
"hide": false,
"instant": false,
"interval": "",
Expand Down Expand Up @@ -1009,7 +1002,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "(histogram_sum(rate(k6_http_req_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))\n/\nhistogram_count(rate(k6_http_req_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))) ",
"expr": "avg by(testid) ((histogram_sum(rate(k6_http_req_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))\n/\nhistogram_count(rate(k6_http_req_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))))",
"hide": false,
"legendFormat": "Response Time (avg) - {{testid}} - {{scenario}} - {{name}}",
"range": true,
Expand All @@ -1021,7 +1014,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "(histogram_sum(rate(k6_iteration_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))\n/\nhistogram_count(rate(k6_iteration_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))) ",
"expr": "avg by(testid) ((histogram_sum(rate(k6_iteration_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))\n/\nhistogram_count(rate(k6_iteration_duration_seconds{testid=~\"$testid\"}[$__rate_interval]))) )",
"hide": false,
"instant": false,
"legendFormat": "Iteration Duration (avg) - {{testid}} - {{scenario}} - {{name}}",
Expand All @@ -1048,14 +1041,30 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum by(testid, payerFspId, payeeFspId) (rate(k6_http_reqs_total{testid=~\"$testid\"}[$__rate_interval]))",
"expr": "sum by(testid, payeeFspId) (rate(k6_http_reqs_total{testid=~\"$testid\"}[$__rate_interval]))",
"format": "time_series",
"hide": false,
"instant": false,
"interval": "",
"legendFormat": "Requests Rate - {{testid}} - {{payerFspId}} -> {{payeeFspId}}",
"legendFormat": "Requests Rate - {{testid}} -> {{payeeFspId}}",
"range": true,
"refId": "G"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum by(testid, payerFspId, payeeFspId) (rate(k6_http_reqs_total{testid=~\"$testid\"}[$__rate_interval]))",
"format": "time_series",
"hide": true,
"instant": false,
"interval": "",
"legendFormat": "Requests Rate - {{testid}} - {{payerFspId}} -> {{payeeFspId}}",
"range": true,
"refId": "H"
}
],
"type": "timeseries"
Expand Down Expand Up @@ -1117,7 +1126,7 @@
"h": 5,
"w": 4,
"x": 0,
"y": 23
"y": 34
},
"id": 85,
"interval": "1s",
Expand Down Expand Up @@ -1245,7 +1254,7 @@
"h": 10,
"w": 9,
"x": 4,
"y": 23
"y": 34
},
"id": 18,
"interval": "5s",
Expand Down Expand Up @@ -1398,7 +1407,7 @@
"h": 10,
"w": 11,
"x": 13,
"y": 23
"y": 34
},
"id": 78,
"interval": "5",
Expand Down Expand Up @@ -1514,7 +1523,7 @@
"h": 5,
"w": 4,
"x": 0,
"y": 28
"y": 39
},
"id": 92,
"interval": "1s",
Expand Down Expand Up @@ -1578,8 +1587,7 @@
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
"color": "red"
},
{
"color": "#EAB839",
Expand Down Expand Up @@ -1648,7 +1656,7 @@
"h": 7,
"w": 13,
"x": 0,
"y": 33
"y": 44
},
"id": 104,
"interval": "1",
Expand Down Expand Up @@ -1805,8 +1813,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand Down Expand Up @@ -1858,7 +1865,7 @@
"h": 7,
"w": 11,
"x": 13,
"y": 33
"y": 44
},
"id": 107,
"interval": "1",
Expand Down Expand Up @@ -1986,7 +1993,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 40
"y": 51
},
"id": 32,
"panels": [],
Expand Down Expand Up @@ -2025,8 +2032,7 @@
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
"color": "blue"
}
]
},
Expand Down Expand Up @@ -2534,7 +2540,7 @@
"h": 9,
"w": 24,
"x": 0,
"y": 41
"y": 52
},
"id": 43,
"interval": "1",
Expand Down Expand Up @@ -2792,8 +2798,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand All @@ -2809,7 +2814,7 @@
"h": 11,
"w": 24,
"x": 0,
"y": 50
"y": 61
},
"id": 41,
"interval": "1s",
Expand Down Expand Up @@ -2988,8 +2993,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
Expand All @@ -3005,7 +3009,7 @@
"h": 11,
"w": 24,
"x": 0,
"y": 61
"y": 72
},
"id": 121,
"interval": "1s",
Expand Down Expand Up @@ -3158,7 +3162,7 @@
"h": 7,
"w": 24,
"x": 0,
"y": 72
"y": 83
},
"id": 54,
"interval": "5s",
Expand Down Expand Up @@ -3364,7 +3368,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 79
"y": 90
},
"id": 35,
"panels": [],
Expand Down Expand Up @@ -3476,7 +3480,7 @@
"h": 7,
"w": 24,
"x": 0,
"y": 80
"y": 91
},
"id": 116,
"interval": "5s",
Expand Down Expand Up @@ -4204,7 +4208,7 @@
"h": 7,
"w": 24,
"x": 0,
"y": 87
"y": 98
},
"id": 122,
"interval": "1",
Expand Down Expand Up @@ -4670,7 +4674,7 @@
"h": 13,
"w": 24,
"x": 0,
"y": 94
"y": 105
},
"id": 117,
"interval": "5",
Expand Down Expand Up @@ -4789,10 +4793,10 @@
"current": {
"selected": true,
"text": [
"1691162724495"
"All"
],
"value": [
"1691162724495"
"$__all"
]
},
"datasource": {
Expand Down Expand Up @@ -4916,6 +4920,6 @@
"timezone": "",
"title": "Official k6 Test Result",
"uid": "01npcT44k",
"version": 1,
"version": 4,
"weekStart": ""
}
Loading

0 comments on commit 03f052f

Please sign in to comment.