Skip to content
Snippets Groups Projects
Commit 7c7bd452 authored by Embruch, Gerd's avatar Embruch, Gerd
Browse files

added .env usage

parent 32543a59
No related branches found
No related tags found
No related merge requests found
TARGET=https://localhost:8080
EMAIL=valid@user.mail
PASSWORD=superSecret123!
...@@ -24,7 +24,6 @@ cp ./.env.template ./.env ...@@ -24,7 +24,6 @@ cp ./.env.template ./.env
- [PM2](https://pm2.keymetrics.io/) - [PM2](https://pm2.keymetrics.io/)
# Roadmap # Roadmap
- [ ] write a starting nodeJS server
- [ ] fetch existing api account from .env - [ ] fetch existing api account from .env
- [ ] create a artillery script to test login & fetch jwt - [ ] create a artillery script to test login & fetch jwt
- [ ] extend script to use JWT to send a prompt - [ ] extend script to use JWT to send a prompt
config: config:
# This is a test server run by team Artillery # This is a test server run by team Artillery
# It's designed to be highly scalable # It's designed to be highly scalable
target: https://localhost:8080 target: "{{ $processEnvironment.TARGET}}"
phases: phases:
- duration: 10 - duration: 1
arrivalRate: 1 arrivalRate: 1
rampTo: 2 rampTo: 2
name: Warm up phase name: Warm up phase
- duration: 20 - duration: 2
arrivalRate: 2 arrivalRate: 2
rampTo: 3 rampTo: 3
name: Ramp up load name: Ramp up load
- duration: 10 - duration: 1
arrivalRate: 3 arrivalRate: 3
rampTo: 4 rampTo: 4
name: Spike phase name: Spike phase
...@@ -30,10 +30,13 @@ config: ...@@ -30,10 +30,13 @@ config:
scenarios: scenarios:
- flow: - flow:
- loop: - loop:
- post:
url: '/users/login'
json:
email: "{{$processEnvironment.EMAIL}}"
password: "{{$processEnvironment.PASSWORD}}"
- get: - get:
url: '/ai/status' url: '/users/logout'
# - get:
# url: '/pony'
# - get: # - get:
# url: '/armadillo' # url: '/armadillo'
count: 100 count: 1
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "performance tests for RAGChat API", "description": "performance tests for RAGChat API",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"start": "artillery run -k ./__tests__/prompting.yaml --output ./reports/prompting.json ; artillery report --output ./reports/prompting.html ./reports/prompting.json" "start": "artillery run -k --dotenv ./.env ./__tests__/prompting.yaml --output ./reports/prompting.json ; artillery report --output ./reports/prompting.html ./reports/prompting.json"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment