config: target: "http://localhost:8080" phases: - duration: 30 arrivalRate: 5 name: "Warm up" - duration: 60 arrivalRate: 20 name: "Load test" - duration: 60 arrivalRate: 50 name: "Stress test" processor: "./ws-processors.js" scenarios: - name: "WebSocket Chat Streaming" weight: 10 flow: - ws: url: "ws://localhost:8080/v1/chat/completions" headers: Authorization: "Bearer {{ $processEnvironment.API_KEY }}" capture: - json: "$[0].choices[0].delta.content" as: "content" send: - json: model: "gpt-4" messages: - role: "user" content: "Tell me a short story" stream: true expect: - statusCode: 200