How to check basic metrics for load testing with K6

Michelle Hung
2 min readSep 10, 2022

During developing feature, we should verify feature working fine, and should make sure performance is expected.

Previous post already have introduced how to write a load testing with K6, I will share how to verify basic matrices(Response time, Error rate, Concurrent users, QPS) with standard output of K6 in the post.

Response time

It measure every requests start to finish of time. This indicator lets us know the time per request takes to complete under the testing scenario.

// http_req_sending + http_req_waiting + http_req_receivinghttp_req_duration

Error rate

During processing requests, there are some expected or unexpected error possibly, and we should know the percentage of failure is expected or not.

http_req_failed// or customize error rate by self
sample of customized error rate

Concurrent users

It measure how many users can send the request or use the feature at the same time.

// "vus" can be set by selfvus

QPS(Query per second)

The number of requests per second.

http_reqs
Standard output

The latest, If running test in k6 cloud, there are many useful performance insights which are provided by k6 cloud, e.g., http_load_throughput_limit.

Performance Insights

--

--