Skip to content

Instantly share code, notes, and snippets.

@brycesch
Last active May 15, 2019 19:37
Show Gist options
  • Save brycesch/46d5ef89fc7bf59a2cba1a14477907a7 to your computer and use it in GitHub Desktop.
Save brycesch/46d5ef89fc7bf59a2cba1a14477907a7 to your computer and use it in GitHub Desktop.
artillery load testing config for phoenix channels
config:
target: "ws://localhost:4000/socket/websocket?client_id=fb55a707-8f3a-4900-b095-0b971550c61d&vsn=2.0.0"
phases:
- duration: 60 # Test for 60 seconds
arrivalRate: 100 # Every second, add 10 users
rampTo: 1000 # And ramp it up to 100 users in total over the 60s period
name: "Ramping up the load"
- duration: 120 # Then resume the load test for 120s
arrivalRate: 100 # With those 100 users we ramped up to in the first phase
rampTo: 1000 # And keep it steady at 100 users
name: "Pushing a constant load"
scenarios:
- engine: "ws"
flow:
- send: '["51","51","room:lobby","phx_join",{}]'
- think: 5
- send: '["1","2","room:lobby","new_msg",{"body":"dsfgsdfgsadfasdfs"}]'
- think: 15 # Every connection will remain open for 15s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment