From 3eae85401def777e180ced7914d9793a65703ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Cimper=C5=A1ak?= Date: Wed, 26 Sep 2018 21:59:58 +0200 Subject: [PATCH] k6: add page (#2353) = --- pages/common/k6.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/k6.md diff --git a/pages/common/k6.md b/pages/common/k6.md new file mode 100644 index 000000000..9ffcc6f6a --- /dev/null +++ b/pages/common/k6.md @@ -0,0 +1,27 @@ +# k6 + +> A modern load testing tool, using Go and JavaScript. + +- Run load test locally: + +`k6 run {{script.js}}` + +- Run load test locally with a given number of virtual users and duration: + +`k6 run --vus {{10}} --duration {{30s}} {{script.js}}` + +- Run load test locally with a given environment variable: + +`k6 run -e {{HOSTNAME=example.com}} {{script.js}}` + +- Run load test locally using InfluxDB to store results: + +`k6 run --out influxdb={{http://localhost:8086/k6db}} {{script.js}}` + +- Login to cloud service using secret token: + +`k6 login cloud --token {{secret}}` + +- Run load test on cloud infrastructure: + +`k6 cloud {{script.js}}`