---
title: "k6 | Grafana k6 documentation"
description: "The k6 module contains k6-specific functionality."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# k6

The [`k6` module](/docs/k6/latest/javascript-api/k6/) contains k6-specific functionality.

Expand table

| Function                                                               | Description                                                                                                                                  |
|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| [check(val, sets, \[tags\])](/docs/k6/latest/javascript-api/k6/check/) | Runs one or more checks on a value and generates a pass/fail result but does not throw errors or otherwise interrupt execution upon failure. |
| [fail(\[err\])](/docs/k6/latest/javascript-api/k6/fail/)               | Throws an error, failing and aborting the current VU script iteration immediately.                                                           |
| [group(name, fn)](/docs/k6/latest/javascript-api/k6/group/)            | Runs code inside a group. Used to organize results in a test.                                                                                |
| [randomSeed(int)](/docs/k6/latest/javascript-api/k6/random-seed/)      | Set seed to get a reproducible pseudo-random number using `Math.random`.                                                                     |
| [sleep(t)](/docs/k6/latest/javascript-api/k6/sleep/)                   | Suspends VU execution for the specified duration.                                                                                            |
