一.基本命令
1. run performance test script:
k6 run filename.js
2. Save results to the file:
run test.js >file_path/test_results.txt
3. Add more VUs:
k6 run --vus 10 --duration 30s script.js
4. 暂停或重新运行脚本:
K6 pause
K6 resume
二. 结果输出设置
k6 run command prints runtime information and general results to stdout.
1. 修改默认标准指标trend statistics (min/max/avg/percentiles)
k6 run --summary-trend-stats="avg,p(99)" stages.js
Output: