Required Installation
* Docker Deamon
How to Run a Test?
-
vus
andduration
parameters must be defined -
command
vus=arg0 duration=arg1 file=arg2 docker-compose up
Calculating RPS with k6
Request Rate = (VU * R) / T
T = (R * http_req_duration) + 1s
Request Rate: measured by the number of requests per second (RPS)
VU: the number of virtual users
R: the number of requests per VU iteration
T: a value larger than the time needed to complete a VU iteration
For Example:
- execute
vus="10" duration="10s" file="/k6/scripts/shortening_link_test.js" docker-compose up
Results visualization:
In order of;
-
Go to http:
localhost: 3000
-
Create a data source
Name
: myInfluxDBUrl
: http://influxdb:8086Database
: k6
configure fields as above
- Create a dashboard
- Click graph to create a new graph panel
- Click the panel title and then edit to set up the graph panel
- Set the panel data source to your
myInfluxDB
database and click theSELECT mean(value)...
statement to edit the metric
Recommended Article: