From de5ab826bbeddf51fe2fb9dedcbc61a99f53ae77 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 22 Jul 2023 15:28:50 +0100 Subject: [PATCH] add artillery load test yml file --- artillery-load-test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 artillery-load-test.yml diff --git a/artillery-load-test.yml b/artillery-load-test.yml new file mode 100644 index 000000000..6b1c81401 --- /dev/null +++ b/artillery-load-test.yml @@ -0,0 +1,36 @@ +# npm install -g artillery@latest +# artillery run artillery-load-test.yml +# Refer https://www.artillery.io/docs + +config: + target: http://128.128.128.128:3000 # replace with your url + phases: + - duration: 1 + arrivalRate: 1 + rampTo: 2 + name: Warm up phase + - duration: 1 + arrivalRate: 2 + rampTo: 3 + name: Ramp up load + - duration: 1 + arrivalRate: 3 + name: Sustained peak load +scenarios: + - flow: + - loop: + - post: + url: '/api/v1/prediction/chatflow-id' # replace with your chatflowid + json: + question: 'hello' # replace with your question + count: 1 # how many request each user make + +# User __ +# 3 / +# 2 / +# 1 _/ +# 1 2 3 +# Seconds +# Total Users = 2 + 3 + 3 = 8 +# Each making 1 HTTP call +# Over a duration of 3 seconds