how can i use the livekit load testing to test mul...
# ask-ai
g
how can i use the livekit load testing to test mulitple rooms with multiple instances of same agent
t
Thanks for reaching out, Dhruv. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! You can totally use the LiveKit CLI to run load tests across multiple rooms using the same agent instances. The
lk perf agent-load-test
command is perfect for this. Here’s a quick example you can try out:
Copy code
lk perf agent-load-test \
  --rooms 5 \
  --agent-name test-agent \
  --echo-speech-delay 10s \
  --duration 5m
What this does is: • Creates 5 separate rooms for testing. • Sends the agent named
test-agent
into each room. • Simulates an echo participant in each room that plays back the agent's audio after a 10-second delay. Just make sure your agent is already up and running with the right name set. Each room works on its own, and when the test wraps up, you’ll get detailed stats like how long it took to dispatch the agent, join delays, and track subscription info. This is a great way to see how your agent handles multiple rooms at once, all while using the same agent instance. If you have any questions or need a hand setting it up, I’m here to help! Sources: pkg/loadtester/loadtester.go | Deployment and scaling | LiveKit Docs
g
can u send a transcript to test instead of echo?
t
The LiveKit CLI's load testing tool works by using an echo participant, which basically listens to the agent's audio and then sends it back with a little delay. Right now, there isn't a built-in way to send a transcript instead of using this echo feature with the
lk perf agent-load-test
command. If you're looking to test transcription performance specifically, you might want to create a custom solution using the LiveKit Agents SDK. Just let me know if you'd like some help or pointers on how to get started—I’m here for you! Sources: pkg/loadtester/agentloadtester.go | basics/repeater.py