mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@@ -35,6 +35,12 @@ Run load test for 10 virtual users:
|
||||
$ ./run.sh -v 10
|
||||
```
|
||||
|
||||
Run load test and send the results to the database "myDb" in influxDB running locally on port 8086 (with no authentication):
|
||||
|
||||
```bash
|
||||
$ ./run.sh -o influxdb=http://localhost:8086/myDb
|
||||
```
|
||||
|
||||
Run auth token slow test (random query latency between 1 and 30 seconds):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -8,8 +8,9 @@ run() {
|
||||
vus='2'
|
||||
testcase='auth_token_test'
|
||||
slowQuery=''
|
||||
out=''
|
||||
|
||||
while getopts ":d:u:v:c:s:" o; do
|
||||
while getopts ":d:u:v:c:s:o:" o; do
|
||||
case "${o}" in
|
||||
d)
|
||||
duration=${OPTARG}
|
||||
@@ -26,11 +27,14 @@ run() {
|
||||
s)
|
||||
slowQuery=${OPTARG}
|
||||
;;
|
||||
o) out=${OPTARG}
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
docker run -t --network=host -v $PWD:/src -e URL=$url -e SLOW_QUERY=$slowQuery --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js
|
||||
docker run -t --network=host -v $PWD:/src -e URL=$url -e SLOW_QUERY=$slowQuery -e K6_OUT=$out --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js
|
||||
}
|
||||
|
||||
run "$@"
|
||||
|
||||
Reference in New Issue
Block a user