Skip to content

Commit 547fb6b

Browse files
chore: fix broken links (#1458)
* Fix metrics section weights * Update eslintignore * Fix broken link to track-data-per-url example * Fix new-relic links * Fix grpc client-loadprotoset links * Fix links to using-k6/k6-options * Fix links to randomseed
1 parent 35d7152 commit 547fb6b

File tree

26 files changed

+70
-69
lines changed

26 files changed

+70
-69
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ public/
33
node_modules/
44
docs/sources/get-started/run-cloud-tests-from-the-CLI.md
55
docs/sources/get-started/run-your-first-tests.md
6+
docs/sources/*/using-k6/metrics/create-custom-metrics.md
67
/docs/sources/*/testing-guides/injecting-faults-with-xk6-disruptor/expose-your-application.md
78
CONTRIBUTING_FILE_FORMAT.md
89
src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 First steps.md

docs/sources/next/get-started/results-output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ The available built-in outputs include:
9797
- [InfluxDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/influxdb)
9898
- [JSON](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/json)
9999
- [Netdata](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/netdata)
100-
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/newrelic)
100+
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/new-relic)
101101
- [Prometheus](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/prometheus-remote-write)
102-
- [TimescaleDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/timescaledb)
102+
- [TimescaleDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/timescaledb)
103103
- [StatsD](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/statsd)
104104

105105
</Glossary>

docs/sources/next/javascript-api/k6-net-grpc/client/client-load-protoset.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 'Client.loadProtoset(protosetPath)'
3+
slug: 'client-loadprotoset'
34
excerpt: 'Loads and parses the protoset file (serialized FileDescriptor set) so they are available to the client to marshal/unmarshal the correct request and response data structures for the RPC schema.'
45
weight: 11
56
---

docs/sources/next/javascript-api/k6/random-seed.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: 'randomSeed( int )'
3-
slug: 'randomseed'
43
description: 'Set seed to get a reproducible pseudo-random number using `Math.random`.'
54
excerpt: 'Set seed to get a reproducible pseudo-random number using `Math.random`.'
65
---

docs/sources/next/misc/integrations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ k6 can output test results to various formats and 3rd-party services.
4444
- [InfluxDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/influxdb)
4545
- [JSON file](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/json)
4646
- [Netdata](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/netdata)
47-
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/newrelic)
47+
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/new-relic)
4848
- [Prometheus](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/prometheus-remote-write)
4949
- [StatsD](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/statsd)
5050
- [TimescaleDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/timescaledb)
@@ -80,4 +80,4 @@ By automating load testing with your CI / CD tools, you can quickly see when a c
8080
- [Tracetest](https://docs.tracetest.io/tools-and-integrations/integrations/k6) - Trace-based testing with Tracetest.
8181
- [Xray](https://docs.getxray.app/display/XRAYCLOUD/Performance+and+load+testing+with+k6) - Using Xray to validate test results in JIRA.
8282

83-
[Reach out to us](mailto:[email protected]) if you have a tool or add-on that works well with k6, and we will list it here!
83+
[Reach out to us](mailto:[email protected]) if you have a tool or add-on that works well with k6, and we will list it here!

docs/sources/next/results-output/real-time/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ As well as the following third-party services:
3535
- [Grafana Cloud Prometheus](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/grafana-cloud-prometheus)
3636
- [InfluxDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/influxdb)
3737
- [Netdata](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/netdata)
38-
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/newrelic)
38+
- [New Relic](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/new-relic)
3939
- [Prometheus remote write](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/prometheus-remote-write)
4040
- [TimescaleDB](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/timescaledb)
4141
- [StatsD](https://grafana.com/docs/k6/<K6_VERSION>/results-output/real-time/statsd)

docs/sources/next/using-k6/metrics/create-custom-metrics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create custom metrics
33
excerpt: How to build custom k6 metrics for each metric type.
4-
weight: 100
4+
weight: 200
55
---
66

77
# Create custom metrics
@@ -24,14 +24,14 @@ Each topic has examples to make a custom metric and create [thresholds](https://
2424
Custom metrics must be created in [init context](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/test-lifecycle).
2525
This limits memory and ensures that k6 can validate that all thresholds are evaluating defined metrics.
2626

27-
{{% /admonition %}}
27+
{{% /admonition %}}
2828

2929
The generic procedure to create a custom metric is as follows:
3030

3131
1. Import the [`k6/metrics`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics) module. Optionally, specify the type of metrics you want to create with a named import:
3232

3333
```javascript
34-
import { Counter } from 'k6/metrics';
34+
import { Trend } from 'k6/metrics';
3535
```
3636

3737
1. In init context, construct a new custom-metric object.
@@ -75,7 +75,7 @@ You can use these tags to filter test results.
7575
Here's how the output of the preceding script might look in the end-of-test summary.
7676
Since the metric is a trend, k6 calculates various trends based on the number of values and their summation.
7777

78-
{{< code >}}
78+
{{< code >}}
7979

8080
```bash
8181
$ k6 run script.js
@@ -96,7 +96,7 @@ $ k6 run script.js
9696
Custom metrics are collected from VU threads only at the end of a VU iteration.
9797
For long-running scripts, custom metrics might appear only after the test runs a while.
9898

99-
{{% /admonition %}}
99+
{{% /admonition %}}
100100

101101
## Read more
102102

docs/sources/next/using-k6/metrics/reference.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in metrics
33
excerpt: A reference of built-in metrics for different supported protocols.
4-
weight: 000
4+
weight: 100
55
---
66

77
# Built-in metrics
@@ -13,16 +13,16 @@ Each supported protocol also has its specific metrics.
1313

1414
k6 always collects the following metrics, no matter what protocol the test uses:
1515

16-
| Metric Name | Type | Description |
17-
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18-
| vus | Gauge | Current number of active virtual users |
19-
| vus_max | Gauge | Max possible number of virtual users (VU resources are [pre-allocated](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/arrival-rate-vu-allocation), to avoid affecting performance when scaling up load ) |
20-
| iterations | Counter | The aggregate number of times the VUs execute the JS script (the `default` function). |
21-
| iteration_duration | Trend | The time to complete one full iteration, including time spent in `setup` and `teardown`. To calculate the duration of the iteration's function for the specific scenario, [try this workaround](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/workaround-iteration-duration) |
22-
| dropped_iterations | Counter | The number of iterations that weren't started due to lack of VUs (for the arrival-rate executors) or lack of time (expired maxDuration in the iteration-based executors). [About dropped iterations](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/dropped-iterations) |
23-
| data_received | Counter | The amount of received data. [This example covers how to track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/tracking-data-per). |
24-
| data_sent | Counter | The amount of data sent. [Track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/tracking-data-per) to track data for an individual URL. |
25-
| checks | Rate | The rate of successful checks. |
16+
| Metric Name | Type | Description |
17+
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
18+
| vus | Gauge | Current number of active virtual users |
19+
| vus_max | Gauge | Max possible number of virtual users (VU resources are [pre-allocated](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/arrival-rate-vu-allocation), to avoid affecting performance when scaling up load). |
20+
| iterations | Counter | The aggregate number of times the VUs execute the JS script (the `default` function). |
21+
| iteration_duration | Trend | The time to complete one full iteration, including time spent in `setup` and `teardown`. To calculate the duration of the iteration's function for the specific scenario, [try this workaround](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/workaround-iteration-duration). |
22+
| dropped_iterations | Counter | The number of iterations that weren't started due to lack of VUs (for the arrival-rate executors) or lack of time (expired maxDuration in the iteration-based executors). Refer to [Dropped iterations](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/dropped-iterations) for more details. |
23+
| data_received | Counter | The amount of received data. [This example covers how to track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url). |
24+
| data_sent | Counter | The amount of data sent. [Track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url) to track data for an individual URL. |
25+
| checks | Rate | The rate of successful checks. |
2626

2727
## HTTP-specific built-in metrics {#http}
2828

@@ -33,7 +33,7 @@ These metrics are generated only when the test makes HTTP requests.
3333
For all `http_req_*` metrics, **the timestamp is emitted the end of the request.**
3434
In other words, the timestamp happens when k6 receives the end of the response body, or the request times out.
3535

36-
{{% /admonition %}}
36+
{{% /admonition %}}
3737

3838
| Metric Name | Type | Description |
3939
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -45,7 +45,7 @@ In other words, the timestamp happens when k6 receives the end of the response b
4545
| http_req_waiting | Trend | Time spent waiting for response from remote host (a.k.a. “time to first byte”, or “TTFB”). `float` |
4646
| http_req_receiving | Trend | Time spent receiving response data from the remote host. `float` |
4747
| http_req_duration | Trend | Total time for the request. It's equal to `http_req_sending + http_req_waiting + http_req_receiving` (i.e. how long did the remote server take to process the request and respond, without the initial DNS lookup/connection times). `float` |
48-
| http_req_failed | Rate | The rate of failed requests according to [setResponseCallback](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/set-response-callback). |
48+
| http_req_failed | Rate | The rate of failed requests according to [setResponseCallback](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/set-response-callback). |
4949

5050
## Browser metrics {#browser}
5151

@@ -105,4 +105,4 @@ k6 emits the following metrics when it interacts with a service through the [`gR
105105

106106
Steams-related metrics (`grpc_streams*`) are available only when using the `k6/experimental/grpc` module which is available on `k6` version `0.45.0` or higher.
107107

108-
{{% /admonition %}}
108+
{{% /admonition %}}

docs/sources/next/using-k6/protocols/ssl-tls/ssl-tls-client-certificates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ excerpt: 'To use client certificates, you specify global that tell k6 how to map
88
Discussion about TLS certificates is usually about how clients authenticate servers.
99
However, both TLS and k6 also support the reverse process, in which servers authenticate clients.
1010

11-
To use client certificates, specify global [configuration options](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/options) that tell k6 how to map a public certificate and private key to the domains they are valid for.
11+
To use client certificates, specify global [configuration options](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options) that tell k6 how to map a public certificate and private key to the domains they are valid for.
1212
You can load the certificate and key from local files or embed them as strings in the script.
1313

1414
## Loading a certificate and a key from local files

docs/sources/next/using-k6/protocols/ssl-tls/ssl-tls-version-and-ciphers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can as also specify which cipher suites are allowed for that connection.
1616
## Limiting SSL/TLS version
1717

1818
To limit the k6 to a specific SSL/TLS version, use a global
19-
[configuration option](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/options):
19+
[configuration option](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options):
2020

2121
{{< code >}}
2222

@@ -33,7 +33,7 @@ export default function () {
3333
```
3434

3535
{{< /code >}}
36-
36+
3737
You can also accept a range of SSL/TLS versions:
3838

3939
{{< code >}}
@@ -68,7 +68,7 @@ Here's the list of available SSL/TLS versions that you can choose from, ordered
6868
## Limiting cipher suites
6969

7070
To limit the cipher suites that k6 is allowed to use, there's a global
71-
[configuration option](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/options).
71+
[configuration option](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options).
7272
You choose a list of allowed ciphers:
7373

7474
{{< code >}}

0 commit comments

Comments
 (0)