mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
25 lines
424 B
Bash
Executable File
25 lines
424 B
Bash
Executable File
#/bin/bash
|
|
|
|
PWD=$(pwd)
|
|
|
|
run() {
|
|
duration='15m'
|
|
url='http://localhost:3000'
|
|
|
|
while getopts ":d:u:" o; do
|
|
case "${o}" in
|
|
d)
|
|
duration=${OPTARG}
|
|
;;
|
|
u)
|
|
url=${OPTARG}
|
|
;;
|
|
esac
|
|
done
|
|
shift $((OPTIND-1))
|
|
|
|
docker run -t --network=host -v $PWD:/src -e URL=$url --rm -i loadimpact/k6:master run --vus 2 --duration $duration src/auth_token_test.js
|
|
}
|
|
|
|
run "$@"
|