workadventure/benchmark/socketio-load-test.yaml

55 lines
1.3 KiB
YAML
Raw Normal View History

2020-09-09 12:32:01 +02:00
config:
target: "http://api.workadventure.localhost/"
socketio:
transports: ["websocket"]
query:
token: "test"
phases:
- duration: 20
arrivalRate: 2
2020-09-09 12:32:01 +02:00
processor: "./socketioLoadTest.js"
scenarios:
- name: "Connects and moves player for 20 seconds"
2020-09-09 12:32:01 +02:00
weight: 90
engine: "socketio"
flow:
- emit:
channel: "set-player-details"
data:
name: 'TEST'
characterLayers: ['male3']
- think: 1
- emit:
channel: "join-room"
data:
2020-09-16 16:59:09 +02:00
roomId: 'global__maps.workadventure.localhost/Floor0/floor0'
2020-09-09 12:32:01 +02:00
position:
x: 783
y: 170
direction: 'down'
moving: false
2020-09-16 09:31:44 +02:00
viewport:
left: 500
top: 0
right: 800
bottom: 200
2020-09-09 12:32:01 +02:00
- think: 1
- loop:
- function: "setYRandom"
- emit:
channel: "user-position"
data:
position:
x: "{{ x }}"
y: "{{ y }}"
direction: 'down'
moving: false
viewport:
left: "{{ left }}"
top: "{{ top }}"
right: "{{ right }}"
bottom: "{{ bottom }}"
- think: 0.2
count: 100
2020-09-09 12:32:01 +02:00
- think: 10