config:
  target: "wss://healthapi.regumapps.com/socket.io/?EIO=4&transport=websocket"
  phases:
    - duration: 30
      arrivalRate: 20   # 20 عميل جديد في الثانية (جرب تزود)
  engines:
    socketio: {}

scenarios:
  - name: "Test add/update/delete events"
    engine: "socketio"
    flow:
      - emit:
          channel: "addItem"
          data:
            itemId: "{{ $uuid }}"
            name: "Test Item"
      - think: 1
      - emit:
          channel: "updateItem"
          data:
            itemId: "{{ $uuid }}"
            name: "Updated Name"
      - think: 1
      - emit:
          channel: "deleteItem"
          data:
            itemId: "{{ $uuid }}"
      - think: 1
      - emit:
          channel: "restoreItem"
          data:
            itemId: "{{ $uuid }}"
      - think: 1
      - loop:
          - emit:
              channel: "checkSync"
              data:
                itemId: "{{ $uuid }}"
          - think: 2
        count: 3

