Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix legacy links and latest #1502

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sources/next/extensions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Currently, k6 supports two ways to extend its native functionality:

## xk6 makes custom binaries

[xk6](https://github.com/grafana/xk6/) is command-line tool and framework written in Go. With xk6, you build custom k6 binaries that bundle one or more extensions written in Go. You have two options for creating k6 binaries: using [Go and xk6](https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-docker/):
[xk6](https://github.com/grafana/xk6/) is command-line tool and framework written in Go. With xk6, you build custom k6 binaries that bundle one or more extensions written in Go. You have two options for creating k6 binaries: using [Go and xk6](https://grafana.com/docs/k6/<K6_VERSION>/extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6/<K6_VERSION>/extensions/build-k6-binary-using-docker/):

{{< code >}}

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/next/extensions/build-k6-binary-using-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ you need to build a binary using Go.

{{% admonition type="note" %}}

Not interested in setting up a Go environment? You can [use Docker instead](https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-docker/).
Not interested in setting up a Go environment? You can [use Docker instead](https://grafana.com/docs/k6/<K6_VERSION>/extensions/build-k6-binary-using-docker/).

{{% /admonition %}}

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/next/extensions/explore.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 01

With over 50 available extensions, the k6 extension ecosystem has many options to meet your requirements and help you incorporate new protocol access, embed a particular client, or improve your test performance. Extensions are developed both by the k6 developers and by the open-source developer community.

Extensions are composable; you can combine any extensions, or mix and match different test cases. You can use [Go and xk6](https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-docker/) to build your custom k6 binary:
Extensions are composable; you can combine any extensions, or mix and match different test cases. You can use [Go and xk6](https://grafana.com/docs/k6/<K6_VERSION>/extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6/<K6_VERSION>/extensions/build-k6-binary-using-docker/) to build your custom k6 binary:

{{< code >}}

Expand Down
32 changes: 16 additions & 16 deletions docs/sources/next/javascript-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ The data module provides helpers to work with data.
The encoding module provides [base64](https://en.wikipedia.org/wiki/Base64)
encoding/decoding as defined by [RFC4648](https://tools.ietf.org/html/rfc4648).

| Function | Description |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------- |
| [b64decode(input, [encoding], [format])](http://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64decode/) | Base64 decode a string. |
| [b64encode(input, [encoding])](http://grafana.com/docs/k6/latest/javascript-api/k6-encoding/b64encode/) | Base64 encode a string. |
| Function | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| [b64decode(input, [encoding], [format])](http://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-encoding/b64decode/) | Base64 decode a string. |
| [b64encode(input, [encoding])](http://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-encoding/b64encode/) | Base64 encode a string. |

## k6/execution

Expand Down Expand Up @@ -161,16 +161,16 @@ The k6/http module contains functionality for performing HTTP transactions.
| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [batch( requests )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/batch) | Issue multiple HTTP requests in parallel (like e.g. browsers tend to do). |
| [cookieJar()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/cookiejar) | Get active HTTP Cookie jar. |
| [del( url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/del) | Issue an HTTP DELETE request. |
| [file( data, [filename], [contentType] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/file) | Create a file object that is used for building multi-part requests. |
| [get( url, [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/get) | Issue an HTTP GET request. |
| [head( url, [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/head) | Issue an HTTP HEAD request. |
| [options( url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/options) | Issue an HTTP OPTIONS request. |
| [patch( url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/patch) | Issue an HTTP PATCH request. |
| [post( url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/post) | Issue an HTTP POST request. |
| [put( url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/put) | Issue an HTTP PUT request. |
| [request( method, url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/request) | Issue any type of HTTP request. |
| [asyncRequest( method, url, [body], [params] )](https://grafana.com/docs/k6/latest/javascript-api/k6-http/asyncrequest) | Issue any type of HTTP request asynchronously. |
| [del( url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/del) | Issue an HTTP DELETE request. |
| [file( data, [filename], [contentType] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/file) | Create a file object that is used for building multi-part requests. |
| [get( url, [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/get) | Issue an HTTP GET request. |
| [head( url, [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/head) | Issue an HTTP HEAD request. |
| [options( url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/options) | Issue an HTTP OPTIONS request. |
| [patch( url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/patch) | Issue an HTTP PATCH request. |
| [post( url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/post) | Issue an HTTP POST request. |
| [put( url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/put) | Issue an HTTP PUT request. |
| [request( method, url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/request) | Issue any type of HTTP request. |
| [asyncRequest( method, url, [body], [params] )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/asyncrequest) | Issue any type of HTTP request asynchronously. |
| [setResponseCallback(expectedStatuses)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/set-response-callback) | Sets a response callback to mark responses as expected. |
| [url\`url\`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/url) | Creates a URL with a name tag. Read more on [URL Grouping](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/http-requests#url-grouping). |
| [expectedStatuses( statusCodes )](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/expected-statuses) | Create a callback for setResponseCallback that checks status codes. |
Expand Down Expand Up @@ -206,8 +206,8 @@ The `k6/net/grpc` module provides a [gRPC](https://grpc.io/) client for Remote P
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Client](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/client) | gRPC client used for making RPC calls to a gRPC Server. |
| [Client.load(importPaths, ...protoFiles)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/client/client-load) | Loads and parses the given protocol buffer definitions to be made available for RPC requests. |
| [Client.connect(address [,params])](https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/client-connect) | Connects to a given gRPC service. |
| [Client.invoke(url, request [,params])](https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/client-invoke) | Makes an unary RPC for the given service/method and returns a [Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/response). |
| [Client.connect(address [,params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/client/client-connect) | Connects to a given gRPC service. |
| [Client.invoke(url, request [,params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/client/client-invoke) | Makes an unary RPC for the given service/method and returns a [Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/response). |
| [Client.close()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/client/client-close) | Close the connection to the gRPC service. |
| [Params](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/params) | RPC Request specific options. |
| [Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/response) | Returned by RPC requests. |
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/next/javascript-api/jslib/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ The [jslib.k6.io](https://jslib.k6.io/) is a collection of external JavaScript l
| Library | Description |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [aws](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/aws) | Library allowing to interact with Amazon AWS services |
| [httpx](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/httpx) | Wrapper around [k6/http](https://k6.io/docs/javascript-api/#k6-http) to simplify session handling |
| [httpx](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/httpx) | Wrapper around [k6/http](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/#k6http) to simplify session handling |
| [k6chaijs](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6chaijs) | BDD assertion style |
| [utils](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/utils) | Small utility functions useful in every day load testing |
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The k6 filesystem experimental module provides a memory-efficient way to handle

### Memory efficiency

One of the key advantages of the filesystem module is its memory efficiency. Unlike the traditional [open](https://grafana.com/docs/k6/latest/javascript-api/init-context/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 all VUs. This approach reduces the risk of encountering out-of-memory errors, especially in load tests involving large files.
One of the key advantages of the filesystem module is its memory efficiency. Unlike the traditional [open](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/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 all VUs. This approach reduces the risk of encountering out-of-memory errors, especially in load tests involving large files.

### Notes on usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 10

# File

The `File` class represents a file with methods for reading, seeking, and obtaining file stats. It's returned by the [open](https://grafana.com/docs/k6/latest/javascript-api/init-context/open/) function.
The `File` class represents a file with methods for reading, seeking, and obtaining file stats. It's returned by the [open](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/open/) function.

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 20

# open

The `open` function opens a file and returns a promise that resolves to a [File](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/fs/file) instance. Unlike the traditional [open](https://grafana.com/docs/k6/latest/javascript-api/init-context/open/) function, which loads a file multiple times into memory, the filesystem module reduces memory usage by loading the file as little possible, and sharing the same memory space between all VUs. This approach reduces the risk of encountering out-of-memory errors, especially in load tests involving large files.
The `open` function opens a file and returns a promise that resolves to a [File](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-experimental/fs/file) instance. Unlike the traditional [open](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/init-context/open/) function, which loads a file multiple times into memory, the filesystem module reduces memory usage by loading the file as little possible, and sharing the same memory space between all VUs. This approach reduces the risk of encountering out-of-memory errors, especially in load tests involving large files.

### Asynchronous nature

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ On the Dashboards UI:

![k6 Prometheus Dashboard](/media/docs/k6-oss/k6-prometheus-dashboard-part1.png)

Optionally, when running the test, you can set the `testid` tag as a [wide test tag](https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/#test-wide-tags) to filter results of a particular test run on this dashboard (or in PromQL queries). `testid` can be any unique string that allows you to identify the test run.
Optionally, when running the test, you can set the `testid` tag as a [wide test tag](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/tags-and-groups/#test-wide-tags) to filter results of a particular test run on this dashboard (or in PromQL queries). `testid` can be any unique string that allows you to identify the test run.

{{< code >}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Clone the repository to get started and follow these steps for using the [docker
k6 run -o experimental-prometheus-rw script.js
```

Optionally, you can set the `testid` tag as a [wide test tag](https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/#test-wide-tags) to segment metrics into discrete test runs and filter specific test results on the pre-built Grafana dashboards or in PromQL queries. `testid` can be any unique string that let you clearly identify the test run.
Optionally, you can set the `testid` tag as a [wide test tag](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/tags-and-groups/#test-wide-tags) to segment metrics into discrete test runs and filter specific test results on the pre-built Grafana dashboards or in PromQL queries. `testid` can be any unique string that let you clearly identify the test run.

**Trend stats**

Expand Down
Loading
Loading