Grafana Cloud

Understand your Performance Testing invoice

Depending on your plan, Performance Testing billing considers the following:

  • Virtual user hours: The number of simulated users active in a test. Note that simulated browser-users are more expensive.
  • Static IP addresses: The number of provisioned static IP addresses in your account. For more details, refer to Static IP addresses.
  • Data retention: The amount of time that your test data is stored. For more details, refer to Data retention.

Virtual User Hours is the main unit that Grafana Cloud uses when calculating your invoice.

Tip

Use the Grafana Cloud k6 calculator to estimate VUH consumption and costs before running your tests. The calculator uses the same billing logic described on this page.

Virtual User Hours calculation

Grafana Cloud k6 subscriptions are based on usage in Virtual User Hours (VU hours, or just VUH).

A Virtual User (VU) is an independent thread of execution that runs concurrently with other VU threads. Often, scripts are designed so that one VU activity represents that of one real user.

A Virtual User Hour (VUH) can be calculated with the following formula:

(Maximum number of VUs * test execution duration in minutes) / 60 minutes = VUH

The above formula is a baseline. How Grafana Cloud applies it on your invoice depends on the Virtual User Hour billing model on your Performance Testing subscription.

Fractional VUH v2 is the billing model for new Grafana Cloud Performance Testing subscriptions. It uses per-minute VUH. It applies volume-based discounts, an adjustment when you stream results from local or private load zones, and separate multipliers for protocol and browser VUs.

Some existing subscriptions still use Fractional VUH v1 or Full VUH. Fractional VUH v1 uses per-minute VUH with protocol and browser multipliers. Only Fractional VUH v2 adds volume discounts and the adjustment when you stream results from local or private load zones. Full VUH uses hour-rounded VUH with the same protocol and browser multipliers. Your billing model is part of your subscription terms. To confirm which model applies or to discuss plan options, contact your account team.

Unless your account team tells you otherwise, use Fractional VUH v2 calculation to interpret your usage and invoices.

Types of VUs

For the purposes of VUH calculation, there are two types of VUs:

  • Protocol VUs - these are VUs calling API endpoints. They often represent the main portion of a test.
  • Browser VUs - these are VUs employing a web browser to test frontend functionality.

The total number of VUs in your test is the sum of Protocol VUs and Browser VUs.

Modes of execution

There are several different ways to run a performance test in Grafana Cloud k6, which include:

  • Cloud execution - running a test using k6 cloud run.
  • Cloud streaming - running a test using k6 run –out cloud and k6 cloud run –local-execution.

Both methods count toward your total number of VUH. How they roll up into billed VUH follows the billing model on your subscription.

Billing calculations

This section begins with Fractional VUH v2, the model used for new Grafana Cloud Performance Testing subscriptions. If you’re on a legacy model, refer to Legacy billing models.

Fractional VUH v2 calculation

The Fractional VUH v2 calculation method is:

(Maximum number of VUs * test execution duration in minutes) / 60 minutes = VUH

The minimum cost for a test is 1 VUH. If a test uses both protocol and browser-VUs, the minimum cost is 2 VUH.

Note that VU hours are calculated based on the period that the test run executes, not the pre-configured test duration. If the test duration is two or more hours but only runs for 30.01 minutes, then the subscription will be charged for the test-execution period rounded up to the next minute (in this case, 31 minutes).

There are three adjustments that are applied to the VUH calculation method:

  • A volume-based adjustment
  • An on-premise execution adjustment
  • A protocol and browser VU adjustment

Volume-based adjustment

Tests that use a higher number of VUH receive automatic adjustments to account for scale. The following table describes the adjustment applied to each VUH range:

VUH RangeEffective RateMax ChargedNotes
1-100 VUH100%100 VUHNo discount
101-500 VUH80% (of 400 VUH)320 VUHApplies only to VUH from 101 to 500.
501-1,000 VUH53.33% (of 500 VUH)266.65 VUHApplies only to VUH from 501 to 1,000.
1,001-5000 VUH33.33% (of 4,000 VUH)1333.2 VUHApplies only to VUH from 1,001 to 5,000.
5001-10,000 VUH26.67% (of 5,000 VUH)1333.5 VUHApplies only to VUH from 5,001 to 10,000.
10,001+ VUH20%Charged at 0.2 VUH per VUH consumed above 10,000.

For example, a test that uses 500 VUH would have the following calculation:

100 VUH (no adjustment applied) + 400 VUH * 0.8 = 420 VUH

On-premise execution adjustment

Tests that are run locally using the k6 CLI and then stream results to Grafana Cloud receive a 25% adjustment to account for infrastructure savings.

Refer to Use the CLI to learn more about local test execution.

Protocol and browser VU adjustment

Tests that use different types of VUs also receive an adjustment when calculating the total billing:

  • Protocol-based VUs (API requests, HTTP, gRPC, WebSocket, etc.): billed at 1x the standard rate.
  • Browser-based VUs: billed at 10x the standard rate due to increased resource usage.

Hybrid tests can include both VU types. In that case, protocol-based VUs are counted at the standard rate, using the base calculation method. Browser-based VUs use the same formula, and the final value is multiplied by 10x:

((Maximum number of VUs * test execution duration in minutes) / 60 minutes) * 10 = Browser VUH

The total cost of a hybrid test is the sum of both protocol-based VUH and browser VUH.

Scenarios

  • Small API test: A test that uses 50 VUs for 10 minutes.
(50 VUs * 10 minutes) / 60 minutes = 8.33 VUH

No adjustments are applied to the final amount.

  • Hybrid API and browser test: A test that uses 50 protocol VUs and 10 browser VUs for 10 minutes.

First, calculate the protocol VUH total:

(50 VUs * 10 minutes) / 60 minutes = 8.33 VUH

Then, calculate the browser VUH total:

((10 VUs * 10 minutes) / 60 minutes) * 10 = 16.67 VUH

And the total value is the sum of both types of VU:

8.33 VUH + 16.67 VUH = 25 VUH
  • Large-scale load test with volume adjustment: A test that uses 5,000 VUs for 1 hour.
(5,000 VUs * 60 minutes) / 60 minutes = 5000 VUH

Then, a volume adjustment is applied since the test uses more than 100 VUH:

(100 * 1) + (400 * 0.8) + (500 * 0.53333) + (4000 * 0.3333) = 2,019.865 VUH
  • Large-scale load test with volume and on-premise execution adjustment: A test that uses 5,000 VUs for 1 hour, and is executed in a Private Load Zone.

Similar to the previous example, the first two steps of the calculation are:

(5,000 VUs * 60 minutes) / 60 minutes = 5000 VUH

The volume adjustment is applied:

(100 * 1) + (400 * 0.8) + (500 * 0.53333) + (4000 * 0.3333) = 2,019.865 VUH

And then the on-premise execution adjustment is applied:

2,019.865 * 0.75 = 1,514.89875 VUH

Arrival-rate executor calculation

k6 has two executors that you can use to set the test load in terms of RPS (requests per second): constant arrival rate and ramping arrival rate.

When you use arrival-rate executors, the calculation for VUH changes. The formula uses two variables you can set for those scenarios, preAllocatedVUs and maxVUs, instead of the maximum number of VUs. maxVUs takes precedence.

For Fractional VUH v2 and Fractional VUH v1 subscriptions, you can use the following formula:

(`maxVUs` or `preAllocatedVUs` * test execution duration in minutes) / 60 minutes = VUH

For Full VUH subscriptions (legacy), refer to Full VUH calculation and use the following formula:

`maxVUs` or `preAllocatedVUs` * (test execution duration in minutes rounded up to the next hour) = VUH

The same 10x multiplier for VUs using browsers applies here too.

In cloud tests with arrival-rate executors, allocate VUs carefully to meet your RPS target and limit unnecessary cost from over-provisioning.

For more information on how to allocate VUs in arrival-rate executors, refer to:

Legacy billing models (existing subscriptions only)

The following models apply only to some existing Performance Testing subscriptions. If you’re new to Performance Testing on Grafana Cloud, refer to Fractional VUH v2 calculation first.

Note

Contact your account team to confirm which billing model is on your subscription or to discuss plan changes.

Fractional VUH v1 calculation

The Fractional VUH v1 calculation method is:

(Maximum number of VUs * test execution duration in minutes) / 60 minutes = VUH

The minimum cost for a test is 1 VUH. If a test uses both protocol and browser-VUs, the minimum cost is 2 VUH.

Note that VU hours are calculated based on the period that the test run executes, not the pre-configured test duration. If the test duration is two or more hours but only runs for 30.01 minutes, then the subscription will be charged for the test-execution period rounded up to the next minute (in this case, 31 minutes).

Protocol and browser VU adjustment

Tests that use different types of VUs receive an adjustment when calculating the total billing:

  • Protocol-based VUs (API requests, HTTP, gRPC, WebSocket, etc.): billed at 1x the standard rate.
  • Browser-based VUs: billed at 10x the standard rate due to increased resource usage.

Hybrid tests can include both VU types. In that case, protocol-based VUs are counted at the standard rate, using the base calculation method. Browser-based VUs use the same formula, and the final value is multiplied by 10x:

((Maximum number of VUs * test execution duration in minutes) / 60 minutes) * 10 = Browser VUH

The total cost of a hybrid test is the sum of both protocol-based VUH and browser VUH.

Scenarios

  • Small API test: A test that uses 50 VUs for 10 minutes.
(50 VUs * 10 minutes) / 60 minutes = 8.33 VUH
  • Hybrid API and browser test: A test that uses 50 protocol VUs and 10 browser VUs for 10 minutes.

First, calculate the protocol VUH total:

(50 VUs * 10 minutes) / 60 minutes = 8.33 VUH

Then, calculate the browser VUH total:

((10 VUs * 10 minutes) / 60 minutes) * 10 = 16.67 VUH

And the total value is the sum of both types of VU:

8.33 VUH + 16.67 VUH = 25 VUH

Full VUH calculation

The Full VUH calculation method is:

Maximum number of VUs * test execution duration rounded up to the next hour = VUH

The minimum cost for a test is 1 VUH. If a test uses both protocol and browser-VUs, the minimum cost is 2 VUH.

Protocol and browser VU adjustment

Tests that use different types of VUs receive an adjustment when calculating the total billing:

  • Protocol-based VUs (API requests, HTTP, gRPC, WebSocket, etc.): billed at 1x the standard rate.
  • Browser-based VUs: billed at 10x the standard rate due to increased resource usage.

The cost of running Browser VUs is calculated using the following formula:

(Maximum number of VUs * test execution duration rounded up to the next hour) * 10 = VUH

Scenarios

  • Small API test: A test that uses 50 VUs for 10 minutes.
50 VUs * ROUNDUP(10/60) = 50 VUH
  • Hybrid API and browser test: A test that uses 50 protocol VUs and 10 browser VUs for 10 minutes.
(50 VUs * ROUNDUP(10/60)) + ((10 Browser VUs * ROUNDUP(10/60)) * 10) = 150 VUH

Static IP addresses

Static IP addresses are IP addresses that don’t change over time. You can add them to your account, and use them when running performance tests for additional security and convenience. With static IP addresses, you can allowlist traffic from Grafana Cloud public load generators and identify logs and traffic created by tests in your observability suite.

Data retention

Warning

Test-result data older than what is specified in your plan is automatically deleted.

Your data retention policy specifies how long the k6 Cloud service keeps your test-result data.

While test-result data is subject to your data retention policy, your user data and test configurations are saved indefinitely. Keep in mind that the data referenced in the following sections of this page refers only to test result data.

Length of data retention

Note

In some informal communication, Grafana might define a data-retention period in months instead of days. In this context, a month of data retention is a unit equal to 30 days.

Performance Testing retains data on a rolling basis, from when the test runs until the length specified by your subscription. This rolling period applies only to active subscriptions. If you cancel your subscription, Performance Testing retains the data for seven days past the subscription expiration.

Refer to Grafana Cloud features for each subscription’s data retention length.

Save test data

Besides purchasing more data retention, you have a few other options to save test data: