Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

New in Grafana k6: The latest OSS features in v0.48.0 and user-defined project limits in Grafana Cloud k6

New in Grafana k6: The latest OSS features in v0.48.0 and user-defined project limits in Grafana Cloud k6

14 Dec, 2023 7 min

Grafana k6 v0.48.0 has been released, featuring support for memory-efficient handling of large files in tests and tons of other improvements for Grafana k6 OSS.

Here’s a quick overview of the latest features in Grafana k6 v0.48.0, as well as some other exciting updates related to Grafana Cloud k6 and the k6 community.

🙌 Grafana k6 v0.48.0 release

The latest release features: 

A k6 new subcommand to generate a test script. This is useful for new users who want to get started quickly, or for experienced users who want to save time when creating test scripts. To use the subcommand, open your terminal and type:

JavaScript
k6 new [filename]

A k6/experimental/fs module for file interactions. This new module provides a memory-efficient way to handle file interactions within your test scripts. It currently offers support for opening files, reading their content, searching them, and retrieving metadata about them. 

Unlike the traditional open() function, which loads a file multiple times into memory, the filesystem module reduces memory usage by loading the file as little as possible, and sharing the same memory space between virtual users (VUs). This approach significantly reduces the memory footprint of your test script and lets you load and process large files without running out of memory. You can check out our documentation for more information and an example of the new functionality. 

The v0.48.0 release includes more internal improvements, minor changes, and fixes from the k6 team and the community. Check out the full list in the k6 release notes.

🌐 k6 browser updates

k6 browser lets you automate browser actions and collect web performance metrics for your k6 tests. With the k6 0.48.0 release, the k6 browser now supports CPU and network throttling! 🥳

With this new feature, you can use page.throttleNetwork to limit network bandwidth and simulate users with slow network connections. For example, if you want to simulate users connecting to your application via Slow 3G, you can use the following code snippet.

JavaScript
import { browser, networkProfiles } from 'k6/experimental/browser';

...

const context = browser.newContext();
const page = context.newPage();

page.throttleNetwork(networkProfiles['Slow 3G']);

...

You can also now use page.throttleCPU to slow down your machine’s performance and simulate users with slower devices. For example, the following code snippet will slow down your machine’s performance by four times.

JavaScript
const context = browser.newContext();
const page = context.newPage();

page.throttleCPU({ rate: 4 });

As always, make sure to read the full release notes for k6 0.48.0 for all the information, and ask in the Community forum if you need our help!

☁️ New in Grafana Cloud k6

This year, we announced the general availability of Grafana Cloud k6, our fully managed performance testing solution in Grafana Cloud. If you want to try it out, Grafana Cloud has a forever-free plan with 500 virtual user hours per month and more. Sign up for free today!

Note: Existing k6 Cloud customers will be migrated to Grafana Cloud k6 at a later date. 

We continue to add more features to Grafana Cloud k6. Some of the latest additions include:

  • User-defined project limits and quotas: When creating performance tests in Grafana Cloud k6, you have to define a few parameters, such as VUs and test duration. This new feature allows admins to set parameter limits and quotas for individual projects to avoid unexpected charges at the end of the billing cycle.
A screenshot of setting project limits and quotas in Grafana Cloud k6.

We are actively seeking customers to try out Private Load Zones v2, which is currently in Public Preview. This enhancement of the k6-operator makes it even easier for users to create “load generators” in their K8s cluster to test internal services. Learn more about how to set up Private Load Zones in our documentation

🔧 k6-operator

During this cycle, we released k6-operator v0.0.12

This release primarily improves the PrivateLoadZone workflow introduced with the previous release. 

Other updates include:

  • The long-awaited removal of DNS restrictions by changing to ClusterIP, thanks to @CarlJi.
  • Enabling the use of topologySpreadConstraints to control how load test jobs are spread across a cluster, as well as documentation updates, thanks to @aslafy-z
  • Several Helm chart improvements based on contributions from @MarkDPierce, @josh-ferrell, @illrill, and @edwintye.
  • Fixes to the linter issues and improvements to the codebase from Hacktoberfest contributor @u5surf.

Thank you to all of our contributors to this release! 💗

⚙️ The latest on k6 Extensions

As usual, there were some exciting changes within the extensions ecosystem with this release cycle! 

The following updates were made to official extensions:

  • xk6-dashboard v0.6.1: Actively undergoing development, as we hope to include this as part of core k6 functionality.
  • xk6-sql v0.3.0: Now uses the official Microsoft JDBC Driver for SQL Server.
  • xk6 v0.10.0: Updates base Docker image to address issues from vulnerability scans.

We’ve deprecated and archived the xk6-amqp and xk6-docker extensions. A community member may pick up AMQP support going forward, but we’ll learn more about this later.

From the community, we’ve seen various updates and fixes for several extensions:

In addition, at least seven new extensions have been discovered in the wild:

It’s amazing to see the new ways folks are extending the functionality of k6!

As always, a huge thank you to our community! We look forward to celebrating more contributor successes!

💜 k6 Champions 

The Grafana k6 Champions Program aims to recognize experts within our community to amplify their contributions and partner with the k6 team.

This time, we have accepted Paul Maxwell-Walters as our latest k6 Champion! Paul has been a big advocate of k6 and is also the acting chair of the Sydney Testers group. Going forward, he’ll be helping us organize a few remote and in-person meetups, focusing on k6 and Grafana. We look forward to having Paul in the program!

Our existing k6 Champions have also been busy within the community:

We are incredibly grateful for all these amazing contributions from our k6 Champions!

If you love using k6 and have done advocacy and education work on behalf of the project, you can apply to be part of our growing program by filling out this Grafana k6 Champions application form.

Also, if you are interested in upcoming k6 news or want to connect with the k6 community, please join us on Slack, Twitter, LinkedIn, or YouTube. Happy testing!

Download the latest version of k6 OSS today, or get started with performance testing on Grafana Cloud, which has a generous forever-free tier that includes 500 Virtual User Hours (VUh) and plans for every use case. Sign up for free now!