docker で実行した。
$ docker run -i loadimpact/k6 run - <script.js
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: -
output: -
scenarios: (100.00%) 1 scenario, 20 max VUs, 2m50s max duration (incl. graceful stop):
* default: Up to 20 looping VUs for 2m20s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)
running (0m01.0s), 01/20 VUs, 0 complete and 0 interrupted iterations
default [ 1% ] 01/20 VUs 0m01.0s/2m20.0s
running (0m02.0s), 02/20 VUs, 1 complete and 0 interrupted iterations
default [ 1% ] 02/20 VUs 0m02.0s/2m20.0s
running (0m03.0s), 02/20 VUs, 1 complete and 0 interrupted iterations
default [ 2% ] 02/20 VUs 0m03.0s/2m20.0s
~~
中略
~~
running (2m19.9s), 01/20 VUs, 1500 complete and 0 interrupted iterations
default [ 100% ] 01/20 VUs 2m20.0s/2m20.0s
running (2m20.9s), 01/20 VUs, 1500 complete and 0 interrupted iterations
default ↓ [ 100% ] 01/20 VUs 2m20s
running (2m21.0s), 00/20 VUs, 1501 complete and 0 interrupted iterations
default ✗ [ 100% ] 00/20 VUs 2m20s
✗ status was 200
↳ 99% — ✓ 1500 / ✗ 1
checks.........................: 99.93% ✓ 1500 ✗ 1
data_received..................: 15 MB 105 kB/s
data_sent......................: 139 kB 985 B/s
http_req_blocked...............: avg=7.32ms min=224ns med=729ns max=595.34ms p(90)=1.26µs p(95)=1.53µs
http_req_connecting............: avg=2.44ms min=0s med=0s max=194.35ms p(90)=0s p(95)=0s
http_req_duration..............: avg=202.66ms min=154.95ms med=183.24ms max=833.52ms p(90)=196.11ms p(95)=363.11ms
{ expected_response:true }...: avg=202.67ms min=154.95ms med=183.25ms max=833.52ms p(90)=196.11ms p(95)=363.36ms
http_req_failed................: 0.06% ✓ 1 ✗ 1500
http_req_receiving.............: avg=417.46µs min=103.5µs med=363.64µs max=11.21ms p(90)=633.19µs p(95)=766.71µs
http_req_sending...............: avg=346.35µs min=65.42µs med=310.89µs max=2.73ms p(90)=531.17µs p(95)=645.74µs
http_req_tls_handshaking.......: avg=4.85ms min=0s med=0s max=393.86ms p(90)=0s p(95)=0s
http_req_waiting...............: avg=201.89ms min=154.02ms med=182.51ms max=832.89ms p(90)=195.27ms p(95)=362.27ms
http_reqs......................: 1501 10.645297/s
iteration_duration.............: avg=1.21s min=1.17s med=1.18s max=2.08s p(90)=1.21s p(95)=1.4s
iterations.....................: 1501 10.645297/s
vus............................: 1 min=1 max=20
vus_max........................: 20 min=20 max=20
テストの説明を書いているブロック。
execution: local
script: -
output: -
scenarios: (100.00%) 1 scenario, 20 max VUs, 2m50s max duration (incl. graceful stop):
* default: Up to 20 looping VUs for 2m20s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)
テスト中のプログレスバー。
running (0m01.0s), 01/20 VUs, 0 complete and 0 interrupted iterations
default [ 1% ] 01/20 VUs 0m01.0s/2m20.0s
running (0m02.0s), 02/20 VUs, 1 complete and 0 interrupted iterations
default [ 1% ] 02/20 VUs 0m02.0s/2m20.0s
running (0m03.0s), 02/20 VUs, 1 complete and 0 interrupted iterations
default [ 2% ] 02/20 VUs 0m03.0s/2m20.0s
~~
中略
~~
running (2m19.9s), 01/20 VUs, 1500 complete and 0 interrupted iterations
default [ 100% ] 01/20 VUs 2m20.0s/2m20.0s
running (2m20.9s), 01/20 VUs, 1500 complete and 0 interrupted iterations
default ↓ [ 100% ] 01/20 VUs 2m20s
running (2m21.0s), 00/20 VUs, 1501 complete and 0 interrupted iterations
default ✗ [ 100% ] 00/20 VUs 2m20s
テスト結果の詳細が出力されるブロック。
✗ status was 200
↳ 99% — ✓ 1500 / ✗ 1
checks.........................: 99.93% ✓ 1500 ✗ 1
data_received..................: 15 MB 105 kB/s
data_sent......................: 139 kB 985 B/s
http_req_blocked...............: avg=7.32ms min=224ns med=729ns max=595.34ms p(90)=1.26µs p(95)=1.53µs
http_req_connecting............: avg=2.44ms min=0s med=0s max=194.35ms p(90)=0s p(95)=0s
http_req_duration..............: avg=202.66ms min=154.95ms med=183.24ms max=833.52ms p(90)=196.11ms p(95)=363.11ms
{ expected_response:true }...: avg=202.67ms min=154.95ms med=183.25ms max=833.52ms p(90)=196.11ms p(95)=363.36ms
http_req_failed................: 0.06% ✓ 1 ✗ 1500
http_req_receiving.............: avg=417.46µs min=103.5µs med=363.64µs max=11.21ms p(90)=633.19µs p(95)=766.71µs
http_req_sending...............: avg=346.35µs min=65.42µs med=310.89µs max=2.73ms p(90)=531.17µs p(95)=645.74µs
http_req_tls_handshaking.......: avg=4.85ms min=0s med=0s max=393.86ms p(90)=0s p(95)=0s
http_req_waiting...............: avg=201.89ms min=154.02ms med=182.51ms max=832.89ms p(90)=195.27ms p(95)=362.27ms
http_reqs......................: 1501 10.645297/s
iteration_duration.............: avg=1.21s min=1.17s med=1.18s max=2.08s p(90)=1.21s p(95)=1.4s
iterations.....................: 1501 10.645297/s
vus............................: 1 min=1 max=20
vus_max........................: 20 min=20 max=20
メトリクス名 | 内容 |
---|---|
checks | チェックの成功率 |
data_received | 受信したデータ量 |
data_sent | 送信したデータ量 |
http_req_blocked | リクエストが開始されるまでのブロック時間 |
http_req_connecting | TCP コネクションを確立するのに要した時間 |
http_req_duration | リクエストに要した総時間 ( http_req_sending + http_req_waiting + http_req_receiving ) |
http_req_failed | 失敗したリクエストの割合 |
http_req_receiving | リモートホストからデータ応答に要した時間 |
http_req_sending | リモートホストへのデータ送信に要した時間 |
http_req_tls_handshaking | TLS セッションのハンドシェイクに要した時間 |
http_req_waiting | リモートホストからの応答を待つのに要した時間 |
http_reqs | 発生したリクエスト件数 |
iteration_duration | 1 回のループに要した時間 |
iterations | default function が実行された回数 |
vus | バーチャルユーザ数 |
vus_max | 最大のバーチャルユーザ数 |