Skip to content

Commit

Permalink
Fix workload
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Oct 21, 2024
1 parent 44e3fe8 commit e6240a0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 2 deletions.
5 changes: 5 additions & 0 deletions k6/assets/nodes-many2many.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"name": "core-node-1",
"url": "https://core-node-1.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -16,6 +17,7 @@
{
"name": "core-node-2",
"url": "https://core-node-2.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -29,6 +31,7 @@
{
"name": "core-node-3",
"url": "https://core-node-3.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -42,6 +45,7 @@
{
"name": "core-node-4",
"url": "https://core-node-4.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -56,6 +60,7 @@
{
"name": "core-node-5",
"url": "https://core-node-5.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": true,
Expand Down
5 changes: 5 additions & 0 deletions k6/assets/nodes-receiver.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"name": "core-node-1",
"url": "https://core-node-1.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": false,
Expand All @@ -13,6 +14,7 @@
{
"name": "core-node-2",
"url": "https://core-node-2.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": false,
Expand All @@ -23,6 +25,7 @@
{
"name": "core-node-3",
"url": "https://core-node-3.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": false,
Expand All @@ -33,6 +36,7 @@
{
"name": "core-node-4",
"url": "https://core-node-4.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": true,
"isReceiver": false,
Expand All @@ -44,6 +48,7 @@
{
"name": "core-node-5",
"url": "https://core-node-5.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": false,
"isReceiver": true,
Expand Down
5 changes: 5 additions & 0 deletions k6/assets/nodes-relayer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"name": "core-node-1",
"url": "https://core-node-1.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": false,
"isReceiver": true,
Expand All @@ -13,6 +14,7 @@
{
"name": "core-node-2",
"url": "https://core-node-2.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": false,
"isReceiver": true,
Expand All @@ -23,6 +25,7 @@
{
"name": "core-node-3",
"url": "https://core-node-3.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": false,
"isReceiver": true,
Expand All @@ -33,6 +36,7 @@
{
"name": "core-node-4",
"url": "https://core-node-4.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": false,
"isReceiver": true,
Expand All @@ -44,6 +48,7 @@
{
"name": "core-node-5",
"url": "https://core-node-5.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": true,
"isReceiver": false,
Expand Down
5 changes: 5 additions & 0 deletions k6/assets/nodes-sender.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"name": "core-node-1",
"url": "https://core-node-1.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": true,
"isRelayer": false,
"isReceiver": false,
Expand All @@ -13,6 +14,7 @@
{
"name": "core-node-2",
"url": "https://core-node-2.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -23,6 +25,7 @@
{
"name": "core-node-3",
"url": "https://core-node-3.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -33,6 +36,7 @@
{
"name": "core-node-4",
"url": "https://core-node-4.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": true,
"isReceiver": true,
Expand All @@ -44,6 +48,7 @@
{
"name": "core-node-5",
"url": "https://core-node-5.core-team.staging.hoprnet.link/",
"enabled": true,
"isSender": false,
"isRelayer": true,
"isReceiver": true,
Expand Down
1 change: 1 addition & 0 deletions k6/assets/workload-constant.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"vus": 1,
"iterations": 1,
"maxDuration": "31m10s",
"gracefulStop": "15s",
"exec": "receiveMessages",
"tags": {
"scenario": "receive_messages"
Expand Down
2 changes: 1 addition & 1 deletion k6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"test:relayer": "npm run webpack && NODES=relayer K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true K6_OUT=xk6-prometheus-rw K6_PROMETHEUS_RW_SERVER_URL=https://prometheus.staging.hoprnet.link/api/v1/write ./k6 run --summary-export=test-execution-local.json --tag testid=local ./dist/send-messages.test.js",
"test:team": "npm run webpack && NODES=team K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true K6_OUT=xk6-prometheus-rw K6_PROMETHEUS_RW_SERVER_URL=https://prometheus.staging.hoprnet.link/api/v1/write ./k6 run --summary-export=test-execution-local.json --tag testid=local ./dist/send-messages.test.js",
"test:dufour": "npm run webpack && NODES=dufour K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true K6_OUT=xk6-prometheus-rw K6_PROMETHEUS_RW_SERVER_URL=https://prometheus.staging.hoprnet.link/api/v1/write ./k6 run --summary-export=test-execution-local.json --tag testid=local ./dist/send-messages.test.js",
"setup:rotsee": "npm run build && NODES=many2many node ./dist/setup-environment.js",
"setup:many2many": "npm run build && NODES=many2many node ./dist/setup-environment.js",
"setup:uhttp": "npm run build && NODES=uhttp node ./dist/setup-environment.js",
"setup:team": "npm run build && NODES=team node ./dist/setup-environment.js",
"parse:results": "node parse-results.js test-execution-20240522-113543.json many2many sanity-check 1 test-2.1.0 30"
Expand Down
4 changes: 3 additions & 1 deletion k6/src/k6/send-messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export function multipleHopMessage(dataPool: { senders: HoprdNode[], relayers: H
let tags = {name: sender.name, hops: hops, path: pathNames}
let startTime = new Date().getTime();
let body = `${startTime} ${JSON.stringify(tags)}`;
sendMessage(sender.url, sender.httpParams, JSON.stringify({ tag: execution.vu.idInInstance + 1024, body, path, peerId: receiver.peerId, hops }), tags)
sendMessage(sender.url, sender.httpParams, JSON.stringify({ tag: execution.vu.idInInstance + 1024, body, path, destination: receiver.peerId, hops }), tags)
}

export function teardown(dataPool: { senders: HoprdNode[], nodes: HoprdNode[] }) {
Expand All @@ -200,6 +200,7 @@ export class HoprdNode {

public name: string
public url: string
public enabled: boolean
public isSender: boolean
public isRelayer: boolean
public isReceiver: boolean
Expand All @@ -220,6 +221,7 @@ export class HoprdNode {
name: data.name
}
},
this.enabled = data.enabled,
this.isSender = data.isSender,
this.isRelayer = data.isRelayer,
this.isReceiver = data.isReceiver
Expand Down

0 comments on commit e6240a0

Please sign in to comment.