Documentationbreadcrumb arrow Learning pathsbreadcrumb arrow Establish a k6 baseline

Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack, or in the Grafana Play stack, with an interactive learning experience.

Establish a performance baseline with k6

Welcome to the Grafana learning path that shows you how to establish a performance baseline with k6. A performance baseline is a set of known-good metric values, such as response time and error rate, that represent how your system behaves under a realistic load. Without a baseline, you have no benchmark to compare against when something changes.

This path guides you through the complete process of creating a baseline: designing a realistic load profile, adding correctness checks, running a test, interpreting the results, encoding your baseline as thresholds, and storing results in k6 Cloud for historical comparison. By the end, you’ll have an automated test that passes or fails based on your system’s actual performance characteristics.

The image below shows an example k6 Cloud test result with passing thresholds based on baseline performance values.

Thresholds tab in Grafana Cloud k6 showing pass and fail results for baseline performance criteria

Here’s what to expect

When you complete this path, you’ll be able to:

  • Understand what p95/p99 latency, throughput, and error rate mean as baseline metrics
  • Design a load profile with the ramping-vus executor that reflects realistic traffic
  • Add checks to validate response correctness alongside performance
  • Interpret k6 summary output including percentiles and averages
  • Define thresholds that make your test pass or fail based on baseline criteria
  • Save and compare results in k6 Cloud

Before you begin

Before you establish a performance baseline, ensure that you have:

  • A Grafana Cloud account. To create an account, refer to Grafana Cloud.
  • k6 installed on your machine. To install k6, refer to k6 installation.
  • Basic knowledge of JavaScript (k6 scripts are written in JavaScript).
  • A code editor such as Visual Studio Code or Cursor.
  • Access to a terminal or command line interface.

Troubleshooting

If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.

More to explore

We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.

Related paths

Consider taking the following path if you're new to k6.

Run your first k6 performance test
Run your first k6 performance test
16 min
·
Beginner
·
Docs & blog posts
Are you ready?