Rapid-fire: k6 commands and flags.
BeginnerConceptBest Practices & Rapid-Fire Commands
Answer
k6 run script.js # run with options from script
k6 run --vus 20 --duration 2m script.js # override load
k6 run -e BASE_URL=http://checkout:8080 script.js # pass env, read via __ENV.BASE_URL
k6 run --out json=results.json script.js # raw metrics
K6_PROMETHEUS_RW_SERVER_URL=http://prometheus:9090/api/v1/write \
k6 run -o experimental-prometheus-rw script.js # stream to Prometheus remote write
k6 inspect script.js # show resolved options
echo $? # 99 means thresholds failed
More on Best Practices & Rapid-Fire Commands
What are your top SLO and alerting best practices?IntermediateWhat are your top incident-management best practices?IntermediateRapid-fire: Prometheus and promtool commands every SRE should know.BeginnerRapid-fire: Alertmanager and amtool commands.BeginnerRapid-fire: Chaos Mesh and kubectl commands for chaos experiments.IntermediateRapid-fire: commands to check service health quickly during an incident on Kubernetes.Intermediate