From dc4059d28ca2d63c339d59b31030d90d0bf62bc6 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Tue, 6 Feb 2024 14:01:38 -0600 Subject: [PATCH 1/3] chore: fix links --- docs/sources/next/javascript-api/jslib/_index.md | 2 +- docs/sources/next/using-k6-browser/metrics.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/next/javascript-api/jslib/_index.md b/docs/sources/next/javascript-api/jslib/_index.md index d15fbc3d6b..dde9636350 100644 --- a/docs/sources/next/javascript-api/jslib/_index.md +++ b/docs/sources/next/javascript-api/jslib/_index.md @@ -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//javascript-api/jslib/aws) | Library allowing to interact with Amazon AWS services | -| [httpx](https://grafana.com/docs/k6//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//javascript-api/jslib/httpx) | Wrapper around [k6/http](https://grafana.com/docs/k6//javascript-api/#k6http) to simplify session handling | | [k6chaijs](https://grafana.com/docs/k6//javascript-api/jslib/k6chaijs) | BDD assertion style | | [utils](https://grafana.com/docs/k6//javascript-api/jslib/utils) | Small utility functions useful in every day load testing | diff --git a/docs/sources/next/using-k6-browser/metrics.md b/docs/sources/next/using-k6-browser/metrics.md index dbb4a8bc85..0b10825eb3 100644 --- a/docs/sources/next/using-k6-browser/metrics.md +++ b/docs/sources/next/using-k6-browser/metrics.md @@ -71,7 +71,7 @@ As the following example shows, you can also pass in different URLs if you're go {{% admonition type="caution" %}} -Currently, you can only use URLs to specify thresholds for different pages. If you use [Groups](https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/#groups), the metrics are not correctly grouped as described in [#721](https://github.com/grafana/xk6-browser/issues/721). +Currently, you can only use URLs to specify thresholds for different pages. If you use [Groups](https://grafana.com/docs/k6//using-k6/tags-and-groups/#groups), the metrics are not correctly grouped as described in [#721](https://github.com/grafana/xk6-browser/issues/721). {{% /admonition %}} @@ -102,7 +102,7 @@ When the test is run, you should see a similar output as the one below. ## Measure custom metrics When using the k6 browser `page.evaluate` function, you can call the [Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API) to measure the performance of web applications. For example, if you want to measure the time it takes for your users to complete actions, such as a search feature, you can use the [`performance.mark`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) method to add a timestamp in your browser's performance timeline. -Using the [`performance.measure`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) method, you can also measure the time difference between two performance markers. The time duration that `performance.measure` returns can be added as a custom metric in k6 browser using [Trends](https://k6.io/docs/javascript-api/k6-metrics/trend/). +Using the [`performance.measure`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) method, you can also measure the time difference between two performance markers. The time duration that `performance.measure` returns can be added as a custom metric in k6 browser using [Trends](https://grafana.com/docs/k6//javascript-api/k6-metrics/trend/). {{< code >}} From 3b467f3c60d0bbe54a56b462856fe97e29cc4d87 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Tue, 6 Feb 2024 14:04:09 -0600 Subject: [PATCH 2/3] chore: fix links to --- docs/sources/next/extensions/_index.md | 2 +- .../extensions/build-k6-binary-using-go.md | 2 +- docs/sources/next/extensions/explore.md | 2 +- docs/sources/next/javascript-api/_index.md | 32 +++++++++---------- .../k6-experimental/fs/_index.md | 2 +- .../k6-experimental/fs/file/_index.md | 2 +- .../javascript-api/k6-experimental/fs/open.md | 2 +- .../real-time/grafana-cloud-prometheus.md | 2 +- .../real-time/prometheus-remote-write.md | 2 +- .../next/testing-guides/api-load-testing.md | 10 +++--- .../testing-guides/load-testing-websites.md | 2 +- docs/sources/next/using-k6/tags-and-groups.md | 2 +- .../create-tests-from-recordings/_index.md | 2 +- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/sources/next/extensions/_index.md b/docs/sources/next/extensions/_index.md index 794d727e31..83e2fc7cba 100644 --- a/docs/sources/next/extensions/_index.md +++ b/docs/sources/next/extensions/_index.md @@ -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//extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6//extensions/build-k6-binary-using-docker/): {{< code >}} diff --git a/docs/sources/next/extensions/build-k6-binary-using-go.md b/docs/sources/next/extensions/build-k6-binary-using-go.md index a983bba173..5e44148e73 100644 --- a/docs/sources/next/extensions/build-k6-binary-using-go.md +++ b/docs/sources/next/extensions/build-k6-binary-using-go.md @@ -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//extensions/build-k6-binary-using-docker/). {{% /admonition %}} diff --git a/docs/sources/next/extensions/explore.md b/docs/sources/next/extensions/explore.md index f66813b7f4..63f1e26c46 100644 --- a/docs/sources/next/extensions/explore.md +++ b/docs/sources/next/extensions/explore.md @@ -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//extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6//extensions/build-k6-binary-using-docker/) to build your custom k6 binary: {{< code >}} diff --git a/docs/sources/next/javascript-api/_index.md b/docs/sources/next/javascript-api/_index.md index e2ba996899..cb55e89f27 100644 --- a/docs/sources/next/javascript-api/_index.md +++ b/docs/sources/next/javascript-api/_index.md @@ -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//javascript-api/k6-encoding/b64decode/) | Base64 decode a string. | +| [b64encode(input, [encoding])](http://grafana.com/docs/k6//javascript-api/k6-encoding/b64encode/) | Base64 encode a string. | ## k6/execution @@ -161,16 +161,16 @@ The k6/http module contains functionality for performing HTTP transactions. | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | [batch( requests )](https://grafana.com/docs/k6//javascript-api/k6-http/batch) | Issue multiple HTTP requests in parallel (like e.g. browsers tend to do). | | [cookieJar()](https://grafana.com/docs/k6//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//javascript-api/k6-http/del) | Issue an HTTP DELETE request. | +| [file( data, [filename], [contentType] )](https://grafana.com/docs/k6//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//javascript-api/k6-http/get) | Issue an HTTP GET request. | +| [head( url, [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/head) | Issue an HTTP HEAD request. | +| [options( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/options) | Issue an HTTP OPTIONS request. | +| [patch( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/patch) | Issue an HTTP PATCH request. | +| [post( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/post) | Issue an HTTP POST request. | +| [put( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/put) | Issue an HTTP PUT request. | +| [request( method, url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/request) | Issue any type of HTTP request. | +| [asyncRequest( method, url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/asyncrequest) | Issue any type of HTTP request asynchronously. | | [setResponseCallback(expectedStatuses)](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) | Sets a response callback to mark responses as expected. | | [url\`url\`](https://grafana.com/docs/k6//javascript-api/k6-http/url) | Creates a URL with a name tag. Read more on [URL Grouping](https://grafana.com/docs/k6//using-k6/http-requests#url-grouping). | | [expectedStatuses( statusCodes )](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | Create a callback for setResponseCallback that checks status codes. | @@ -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//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//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//javascript-api/k6-net-grpc/response). | +| [Client.connect(address [,params])](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/client/client-connect) | Connects to a given gRPC service. | +| [Client.invoke(url, request [,params])](https://grafana.com/docs/k6//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//javascript-api/k6-net-grpc/response). | | [Client.close()](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/client/client-close) | Close the connection to the gRPC service. | | [Params](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/params) | RPC Request specific options. | | [Response](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/response) | Returned by RPC requests. | diff --git a/docs/sources/next/javascript-api/k6-experimental/fs/_index.md b/docs/sources/next/javascript-api/k6-experimental/fs/_index.md index a31b80efde..122fa81a23 100644 --- a/docs/sources/next/javascript-api/k6-experimental/fs/_index.md +++ b/docs/sources/next/javascript-api/k6-experimental/fs/_index.md @@ -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//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 diff --git a/docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md b/docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md index 1ec1ca6504..f91d7b8266 100644 --- a/docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md +++ b/docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md @@ -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//javascript-api/init-context/open/) function. ## Properties diff --git a/docs/sources/next/javascript-api/k6-experimental/fs/open.md b/docs/sources/next/javascript-api/k6-experimental/fs/open.md index 78ce0d7c26..9875a3dc9c 100644 --- a/docs/sources/next/javascript-api/k6-experimental/fs/open.md +++ b/docs/sources/next/javascript-api/k6-experimental/fs/open.md @@ -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//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//javascript-api/k6-experimental/fs/file) instance. Unlike the traditional [open](https://grafana.com/docs/k6//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 diff --git a/docs/sources/next/results-output/real-time/grafana-cloud-prometheus.md b/docs/sources/next/results-output/real-time/grafana-cloud-prometheus.md index 22d1f94146..3bccfd29c2 100644 --- a/docs/sources/next/results-output/real-time/grafana-cloud-prometheus.md +++ b/docs/sources/next/results-output/real-time/grafana-cloud-prometheus.md @@ -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//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 >}} diff --git a/docs/sources/next/results-output/real-time/prometheus-remote-write.md b/docs/sources/next/results-output/real-time/prometheus-remote-write.md index 60e2c28525..5ecf7841cd 100644 --- a/docs/sources/next/results-output/real-time/prometheus-remote-write.md +++ b/docs/sources/next/results-output/real-time/prometheus-remote-write.md @@ -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//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** diff --git a/docs/sources/next/testing-guides/api-load-testing.md b/docs/sources/next/testing-guides/api-load-testing.md index 2c3aca69fd..298ca7c15c 100644 --- a/docs/sources/next/testing-guides/api-load-testing.md +++ b/docs/sources/next/testing-guides/api-load-testing.md @@ -113,9 +113,9 @@ When testing the API against normal, human-run workflows, add sleep as in a norm When you model load according to VUs, the basic load options are: -- [`vus`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#vus) -- [`duration`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#duration) -- [`iterations`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#iterations) +- [`vus`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#vus) +- [`duration`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#duration) +- [`iterations`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#iterations) You can define these options in the test script. In the following test, 50 concurrent users continuously run the `default` flow for 30 seconds. @@ -496,14 +496,14 @@ The process of creating a new load test goes like this: 1. Configure the specific load and other options. 1. Import the scenario. -As your testing matures, consider creating tests that [combine multiple scenarios](https://grafana.com/docs/k6/latest/using-k6/scenarios/advanced-examples/#combine-scenarios) to simulate more diverse traffic. +As your testing matures, consider creating tests that [combine multiple scenarios](https://grafana.com/docs/k6//using-k6/scenarios/advanced-examples/#combine-scenarios) to simulate more diverse traffic. ### Dynamic URLs for one endpoint By default, when you access the same API endpoint with different URLs―for example, `http://example.com/posts/${id}`―k6 reports the endpoint results separately. This may create an unnecessary amount of metrics. -To group the results of the endpoint, use [URL grouping](https://grafana.com/docs/k6/latest/using-k6/http-requests/#url-grouping). +To group the results of the endpoint, use [URL grouping](https://grafana.com/docs/k6//using-k6/http-requests/#url-grouping). ## Load generator locations diff --git a/docs/sources/next/testing-guides/load-testing-websites.md b/docs/sources/next/testing-guides/load-testing-websites.md index a60e833eab..6e865a829f 100644 --- a/docs/sources/next/testing-guides/load-testing-websites.md +++ b/docs/sources/next/testing-guides/load-testing-websites.md @@ -263,7 +263,7 @@ When you script a test for a website, consider these recommendations. **Use concurrent requests.** To mimic the way modern browsers download some requests in parallel, use [batching](https://grafana.com/docs/k6//javascript-api/k6-http/batch). -**Determine cache and cookie behaviour.** k6 automatically resets cookies between iterations, but you can also [change this behavior](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#no-cookies-reset) if maintaining cookies would be more realistic. +**Determine cache and cookie behaviour.** k6 automatically resets cookies between iterations, but you can also [change this behavior](https://grafana.com/docs/k6//using-k6/k6-options/reference/#no-cookies-reset) if maintaining cookies would be more realistic. **Use dynamic think time and pacing.** Consider adding varying [delays](https://grafana.com/docs/k6//javascript-api/k6/sleep) so you don't artificially stagger a script with completely uniform delays. diff --git a/docs/sources/next/using-k6/tags-and-groups.md b/docs/sources/next/using-k6/tags-and-groups.md index e674a7af5e..1dac6fe822 100644 --- a/docs/sources/next/using-k6/tags-and-groups.md +++ b/docs/sources/next/using-k6/tags-and-groups.md @@ -305,7 +305,7 @@ Groups do the following tasks internally: - When a taggable resource—a check, request, or custom metric—runs within a group, k6 sets the tag `group` with the current group name. For more info, refer to the [Tags section](https://grafana.com/docs/k6//using-k6/tags-and-groups#tags). -Both options, the `group_duration` metric and `group tagging`, could help you analyze and visualize complex test results. Check out how they work in your [k6 result output](https://grafana.com/docs/k6/latest/misc/integrations#result-store-and-visualization). +Both options, the `group_duration` metric and `group tagging`, could help you analyze and visualize complex test results. Check out how they work in your [k6 result output](https://grafana.com/docs/k6//misc/integrations#result-store-and-visualization). ### Discouraged: one group per request diff --git a/docs/sources/next/using-k6/test-authoring/create-tests-from-recordings/_index.md b/docs/sources/next/using-k6/test-authoring/create-tests-from-recordings/_index.md index 2dae69a5de..3933111605 100644 --- a/docs/sources/next/using-k6/test-authoring/create-tests-from-recordings/_index.md +++ b/docs/sources/next/using-k6/test-authoring/create-tests-from-recordings/_index.md @@ -55,7 +55,7 @@ The script could include **dozens or hundreds of requests for each page visit or These types of recorded tests are difficult to maintain. As the website changes, these tests must be updated to reflect assets and API changes. -An alternative approach to load test websites is to run a [hybrid load test](https://grafana.com/docs/k6/latest/testing-guides/load-testing-websites/#hybrid-load-testing) which: +An alternative approach to load test websites is to run a [hybrid load test](https://grafana.com/docs/k6//testing-guides/load-testing-websites/#hybrid-load-testing) which: - Runs a [browser test](https://grafana.com/docs/k6//using-k6-browser/running-browser-tests) to validate the frontend. - While simultaneously running API tests to inject load to the backend. From b75c92da78259eeaba861b939678408afb80c367 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Tue, 6 Feb 2024 14:05:48 -0600 Subject: [PATCH 3/3] chore: apply-patch to v0.49 --- docs/sources/v0.49.x/extensions/_index.md | 2 +- .../extensions/build-k6-binary-using-go.md | 2 +- docs/sources/v0.49.x/extensions/explore.md | 2 +- docs/sources/v0.49.x/javascript-api/_index.md | 32 +++++++++---------- .../v0.49.x/javascript-api/jslib/_index.md | 2 +- .../k6-experimental/fs/_index.md | 2 +- .../k6-experimental/fs/file/_index.md | 2 +- .../javascript-api/k6-experimental/fs/open.md | 2 +- .../real-time/grafana-cloud-prometheus.md | 2 +- .../real-time/prometheus-remote-write.md | 2 +- .../testing-guides/api-load-testing.md | 10 +++--- .../testing-guides/load-testing-websites.md | 2 +- .../v0.49.x/using-k6-browser/metrics.md | 4 +-- .../v0.49.x/using-k6/tags-and-groups.md | 2 +- .../create-tests-from-recordings/_index.md | 2 +- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/sources/v0.49.x/extensions/_index.md b/docs/sources/v0.49.x/extensions/_index.md index 794d727e31..83e2fc7cba 100644 --- a/docs/sources/v0.49.x/extensions/_index.md +++ b/docs/sources/v0.49.x/extensions/_index.md @@ -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//extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6//extensions/build-k6-binary-using-docker/): {{< code >}} diff --git a/docs/sources/v0.49.x/extensions/build-k6-binary-using-go.md b/docs/sources/v0.49.x/extensions/build-k6-binary-using-go.md index a983bba173..5e44148e73 100644 --- a/docs/sources/v0.49.x/extensions/build-k6-binary-using-go.md +++ b/docs/sources/v0.49.x/extensions/build-k6-binary-using-go.md @@ -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//extensions/build-k6-binary-using-docker/). {{% /admonition %}} diff --git a/docs/sources/v0.49.x/extensions/explore.md b/docs/sources/v0.49.x/extensions/explore.md index f66813b7f4..63f1e26c46 100644 --- a/docs/sources/v0.49.x/extensions/explore.md +++ b/docs/sources/v0.49.x/extensions/explore.md @@ -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//extensions/build-k6-binary-using-go/) or [Docker](https://grafana.com/docs/k6//extensions/build-k6-binary-using-docker/) to build your custom k6 binary: {{< code >}} diff --git a/docs/sources/v0.49.x/javascript-api/_index.md b/docs/sources/v0.49.x/javascript-api/_index.md index e2ba996899..cb55e89f27 100644 --- a/docs/sources/v0.49.x/javascript-api/_index.md +++ b/docs/sources/v0.49.x/javascript-api/_index.md @@ -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//javascript-api/k6-encoding/b64decode/) | Base64 decode a string. | +| [b64encode(input, [encoding])](http://grafana.com/docs/k6//javascript-api/k6-encoding/b64encode/) | Base64 encode a string. | ## k6/execution @@ -161,16 +161,16 @@ The k6/http module contains functionality for performing HTTP transactions. | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | [batch( requests )](https://grafana.com/docs/k6//javascript-api/k6-http/batch) | Issue multiple HTTP requests in parallel (like e.g. browsers tend to do). | | [cookieJar()](https://grafana.com/docs/k6//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//javascript-api/k6-http/del) | Issue an HTTP DELETE request. | +| [file( data, [filename], [contentType] )](https://grafana.com/docs/k6//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//javascript-api/k6-http/get) | Issue an HTTP GET request. | +| [head( url, [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/head) | Issue an HTTP HEAD request. | +| [options( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/options) | Issue an HTTP OPTIONS request. | +| [patch( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/patch) | Issue an HTTP PATCH request. | +| [post( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/post) | Issue an HTTP POST request. | +| [put( url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/put) | Issue an HTTP PUT request. | +| [request( method, url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/request) | Issue any type of HTTP request. | +| [asyncRequest( method, url, [body], [params] )](https://grafana.com/docs/k6//javascript-api/k6-http/asyncrequest) | Issue any type of HTTP request asynchronously. | | [setResponseCallback(expectedStatuses)](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) | Sets a response callback to mark responses as expected. | | [url\`url\`](https://grafana.com/docs/k6//javascript-api/k6-http/url) | Creates a URL with a name tag. Read more on [URL Grouping](https://grafana.com/docs/k6//using-k6/http-requests#url-grouping). | | [expectedStatuses( statusCodes )](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | Create a callback for setResponseCallback that checks status codes. | @@ -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//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//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//javascript-api/k6-net-grpc/response). | +| [Client.connect(address [,params])](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/client/client-connect) | Connects to a given gRPC service. | +| [Client.invoke(url, request [,params])](https://grafana.com/docs/k6//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//javascript-api/k6-net-grpc/response). | | [Client.close()](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/client/client-close) | Close the connection to the gRPC service. | | [Params](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/params) | RPC Request specific options. | | [Response](https://grafana.com/docs/k6//javascript-api/k6-net-grpc/response) | Returned by RPC requests. | diff --git a/docs/sources/v0.49.x/javascript-api/jslib/_index.md b/docs/sources/v0.49.x/javascript-api/jslib/_index.md index d15fbc3d6b..dde9636350 100644 --- a/docs/sources/v0.49.x/javascript-api/jslib/_index.md +++ b/docs/sources/v0.49.x/javascript-api/jslib/_index.md @@ -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//javascript-api/jslib/aws) | Library allowing to interact with Amazon AWS services | -| [httpx](https://grafana.com/docs/k6//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//javascript-api/jslib/httpx) | Wrapper around [k6/http](https://grafana.com/docs/k6//javascript-api/#k6http) to simplify session handling | | [k6chaijs](https://grafana.com/docs/k6//javascript-api/jslib/k6chaijs) | BDD assertion style | | [utils](https://grafana.com/docs/k6//javascript-api/jslib/utils) | Small utility functions useful in every day load testing | diff --git a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/_index.md b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/_index.md index a31b80efde..122fa81a23 100644 --- a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/_index.md +++ b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/_index.md @@ -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//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 diff --git a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/file/_index.md b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/file/_index.md index 1ec1ca6504..f91d7b8266 100644 --- a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/file/_index.md +++ b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/file/_index.md @@ -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//javascript-api/init-context/open/) function. ## Properties diff --git a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/open.md b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/open.md index 78ce0d7c26..9875a3dc9c 100644 --- a/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/open.md +++ b/docs/sources/v0.49.x/javascript-api/k6-experimental/fs/open.md @@ -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//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//javascript-api/k6-experimental/fs/file) instance. Unlike the traditional [open](https://grafana.com/docs/k6//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 diff --git a/docs/sources/v0.49.x/results-output/real-time/grafana-cloud-prometheus.md b/docs/sources/v0.49.x/results-output/real-time/grafana-cloud-prometheus.md index 22d1f94146..3bccfd29c2 100644 --- a/docs/sources/v0.49.x/results-output/real-time/grafana-cloud-prometheus.md +++ b/docs/sources/v0.49.x/results-output/real-time/grafana-cloud-prometheus.md @@ -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//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 >}} diff --git a/docs/sources/v0.49.x/results-output/real-time/prometheus-remote-write.md b/docs/sources/v0.49.x/results-output/real-time/prometheus-remote-write.md index 60e2c28525..5ecf7841cd 100644 --- a/docs/sources/v0.49.x/results-output/real-time/prometheus-remote-write.md +++ b/docs/sources/v0.49.x/results-output/real-time/prometheus-remote-write.md @@ -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//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** diff --git a/docs/sources/v0.49.x/testing-guides/api-load-testing.md b/docs/sources/v0.49.x/testing-guides/api-load-testing.md index 2c3aca69fd..298ca7c15c 100644 --- a/docs/sources/v0.49.x/testing-guides/api-load-testing.md +++ b/docs/sources/v0.49.x/testing-guides/api-load-testing.md @@ -113,9 +113,9 @@ When testing the API against normal, human-run workflows, add sleep as in a norm When you model load according to VUs, the basic load options are: -- [`vus`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#vus) -- [`duration`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#duration) -- [`iterations`](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#iterations) +- [`vus`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#vus) +- [`duration`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#duration) +- [`iterations`](https://grafana.com/docs/k6//using-k6/k6-options/reference/#iterations) You can define these options in the test script. In the following test, 50 concurrent users continuously run the `default` flow for 30 seconds. @@ -496,14 +496,14 @@ The process of creating a new load test goes like this: 1. Configure the specific load and other options. 1. Import the scenario. -As your testing matures, consider creating tests that [combine multiple scenarios](https://grafana.com/docs/k6/latest/using-k6/scenarios/advanced-examples/#combine-scenarios) to simulate more diverse traffic. +As your testing matures, consider creating tests that [combine multiple scenarios](https://grafana.com/docs/k6//using-k6/scenarios/advanced-examples/#combine-scenarios) to simulate more diverse traffic. ### Dynamic URLs for one endpoint By default, when you access the same API endpoint with different URLs―for example, `http://example.com/posts/${id}`―k6 reports the endpoint results separately. This may create an unnecessary amount of metrics. -To group the results of the endpoint, use [URL grouping](https://grafana.com/docs/k6/latest/using-k6/http-requests/#url-grouping). +To group the results of the endpoint, use [URL grouping](https://grafana.com/docs/k6//using-k6/http-requests/#url-grouping). ## Load generator locations diff --git a/docs/sources/v0.49.x/testing-guides/load-testing-websites.md b/docs/sources/v0.49.x/testing-guides/load-testing-websites.md index a60e833eab..6e865a829f 100644 --- a/docs/sources/v0.49.x/testing-guides/load-testing-websites.md +++ b/docs/sources/v0.49.x/testing-guides/load-testing-websites.md @@ -263,7 +263,7 @@ When you script a test for a website, consider these recommendations. **Use concurrent requests.** To mimic the way modern browsers download some requests in parallel, use [batching](https://grafana.com/docs/k6//javascript-api/k6-http/batch). -**Determine cache and cookie behaviour.** k6 automatically resets cookies between iterations, but you can also [change this behavior](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#no-cookies-reset) if maintaining cookies would be more realistic. +**Determine cache and cookie behaviour.** k6 automatically resets cookies between iterations, but you can also [change this behavior](https://grafana.com/docs/k6//using-k6/k6-options/reference/#no-cookies-reset) if maintaining cookies would be more realistic. **Use dynamic think time and pacing.** Consider adding varying [delays](https://grafana.com/docs/k6//javascript-api/k6/sleep) so you don't artificially stagger a script with completely uniform delays. diff --git a/docs/sources/v0.49.x/using-k6-browser/metrics.md b/docs/sources/v0.49.x/using-k6-browser/metrics.md index dbb4a8bc85..0b10825eb3 100644 --- a/docs/sources/v0.49.x/using-k6-browser/metrics.md +++ b/docs/sources/v0.49.x/using-k6-browser/metrics.md @@ -71,7 +71,7 @@ As the following example shows, you can also pass in different URLs if you're go {{% admonition type="caution" %}} -Currently, you can only use URLs to specify thresholds for different pages. If you use [Groups](https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/#groups), the metrics are not correctly grouped as described in [#721](https://github.com/grafana/xk6-browser/issues/721). +Currently, you can only use URLs to specify thresholds for different pages. If you use [Groups](https://grafana.com/docs/k6//using-k6/tags-and-groups/#groups), the metrics are not correctly grouped as described in [#721](https://github.com/grafana/xk6-browser/issues/721). {{% /admonition %}} @@ -102,7 +102,7 @@ When the test is run, you should see a similar output as the one below. ## Measure custom metrics When using the k6 browser `page.evaluate` function, you can call the [Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API) to measure the performance of web applications. For example, if you want to measure the time it takes for your users to complete actions, such as a search feature, you can use the [`performance.mark`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) method to add a timestamp in your browser's performance timeline. -Using the [`performance.measure`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) method, you can also measure the time difference between two performance markers. The time duration that `performance.measure` returns can be added as a custom metric in k6 browser using [Trends](https://k6.io/docs/javascript-api/k6-metrics/trend/). +Using the [`performance.measure`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure) method, you can also measure the time difference between two performance markers. The time duration that `performance.measure` returns can be added as a custom metric in k6 browser using [Trends](https://grafana.com/docs/k6//javascript-api/k6-metrics/trend/). {{< code >}} diff --git a/docs/sources/v0.49.x/using-k6/tags-and-groups.md b/docs/sources/v0.49.x/using-k6/tags-and-groups.md index e674a7af5e..1dac6fe822 100644 --- a/docs/sources/v0.49.x/using-k6/tags-and-groups.md +++ b/docs/sources/v0.49.x/using-k6/tags-and-groups.md @@ -305,7 +305,7 @@ Groups do the following tasks internally: - When a taggable resource—a check, request, or custom metric—runs within a group, k6 sets the tag `group` with the current group name. For more info, refer to the [Tags section](https://grafana.com/docs/k6//using-k6/tags-and-groups#tags). -Both options, the `group_duration` metric and `group tagging`, could help you analyze and visualize complex test results. Check out how they work in your [k6 result output](https://grafana.com/docs/k6/latest/misc/integrations#result-store-and-visualization). +Both options, the `group_duration` metric and `group tagging`, could help you analyze and visualize complex test results. Check out how they work in your [k6 result output](https://grafana.com/docs/k6//misc/integrations#result-store-and-visualization). ### Discouraged: one group per request diff --git a/docs/sources/v0.49.x/using-k6/test-authoring/create-tests-from-recordings/_index.md b/docs/sources/v0.49.x/using-k6/test-authoring/create-tests-from-recordings/_index.md index 2dae69a5de..3933111605 100644 --- a/docs/sources/v0.49.x/using-k6/test-authoring/create-tests-from-recordings/_index.md +++ b/docs/sources/v0.49.x/using-k6/test-authoring/create-tests-from-recordings/_index.md @@ -55,7 +55,7 @@ The script could include **dozens or hundreds of requests for each page visit or These types of recorded tests are difficult to maintain. As the website changes, these tests must be updated to reflect assets and API changes. -An alternative approach to load test websites is to run a [hybrid load test](https://grafana.com/docs/k6/latest/testing-guides/load-testing-websites/#hybrid-load-testing) which: +An alternative approach to load test websites is to run a [hybrid load test](https://grafana.com/docs/k6//testing-guides/load-testing-websites/#hybrid-load-testing) which: - Runs a [browser test](https://grafana.com/docs/k6//using-k6-browser/running-browser-tests) to validate the frontend. - While simultaneously running API tests to inject load to the backend.