Skip to main content

Artillery

Reference to the tool: https://www.artillery.io/docs/get-started/get-artillery

Configuration


config:
# This is a test server run by team Artillery
# It's designed to be highly scalable
target: http://sarah.gudasoft.com:49161
# tls:
# rejectUnauthorized: false
http:
# Set a max of five TCP connections per virtual user.
maxSockets: 5
# Responses have to be sent within 10 seconds, or an `ETIMEDOUT` error gets raised.
timeout: 10
phases:
- duration: 60
arrivalRate: 1
rampTo: 5
name: Warm up phase
- duration: 60
arrivalRate: 5
rampTo: 10
name: Ramp up load
- duration: 30
arrivalRate: 10
rampTo: 30
name: Spike phase
# Load & configure a couple of useful plugins
# https://docs.art/reference/extensions
plugins:
ensure: {}
apdex: {}
metrics-by-endpoint: {}
apdex:
threshold: 100
ensure:
thresholds:
- http.response_time.p99: 100
- http.response_time.p95: 75
scenarios:
- flow:
- loop:
- post:
url: "/dino"
json:
hello: "dino"
- post:
url: "/pony"
json:
hello: "pony"
- post:
url: "/armadillo"
json:
hello: "armadillo"
count: 1000

Run

npm install -g artillery@latest npx artillery dino artillery run config

Results


--------------------------------
Summary report @ 16:51:10(+0200)
--------------------------------

apdex.frustrated: .............................................................. 974
apdex.satisfied: ............................................................... 2893913
apdex.tolerated: ............................................................... 9113
errors.ETIMEDOUT: .............................................................. 262
http.codes.200: ................................................................ 2904000
http.downloaded_bytes: ......................................................... 20328000
http.request_rate: ............................................................. 23190/sec
http.requests: ................................................................. 2904262
http.response_time:
min: ......................................................................... 1
max: ......................................................................... 958
mean: ........................................................................ 10
median: ...................................................................... 8.9
p95: ......................................................................... 16.9
p99: ......................................................................... 21.1
http.responses: ................................................................ 2904000
plugins.metrics-by-endpoint./armadillo.codes.200: .............................. 968000
plugins.metrics-by-endpoint./dino.codes.200: ................................... 968000
plugins.metrics-by-endpoint./pony.codes.200: ................................... 968000
plugins.metrics-by-endpoint.response_time./armadillo:
min: ......................................................................... 1
max: ......................................................................... 958
mean: ........................................................................ 10
median: ...................................................................... 8.9
p95: ......................................................................... 16.9
p99: ......................................................................... 21.1
plugins.metrics-by-endpoint.response_time./dino:
min: ......................................................................... 1
max: ......................................................................... 906
mean: ........................................................................ 10
median: ...................................................................... 8.9
p95: ......................................................................... 16.9
p99: ......................................................................... 21.1
plugins.metrics-by-endpoint.response_time./pony:
min: ......................................................................... 1
max: ......................................................................... 903
mean: ........................................................................ 10
median: ...................................................................... 8.9
p95: ......................................................................... 16.9
p99: ......................................................................... 21.1
vusers.completed: .............................................................. 968
vusers.created: ................................................................ 1230
vusers.created_by_name.0: ...................................................... 1230
vusers.failed: ................................................................. 262
vusers.session_length:
min: ......................................................................... 10677.7
max: ......................................................................... 47107.5
mean: ........................................................................ 32678.3
median: ...................................................................... 33870.4
p95: ......................................................................... 44815.4
p99: ......................................................................... 46644.4

Checks:
ok: http.response_time.p95 < 75
ok: http.response_time.p99 < 100


Apdex score: 0.9980955578512397 (excellent)