Skip to content

Commit 429e5aa

Browse files
Apply suggestions from code review
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
1 parent a096157 commit 429e5aa

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

docs/sources/k6/next/javascript-api/k6-x-dns/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: 'k6 DNS extension API'
44
weight: 11
55
---
66

7-
# DNS
7+
# k6/x/dns
88

99
{{< docs/shared source="k6" lookup="extension.md" version="<K6_VERSION>" >}}
1010

11-
The `k6/x/dns` modul enables DNS resolution testing in k6, allowing you to resolve DNS names to IP addresses using custom DNS servers or the system's default DNS configuration. This module is particularly useful for testing DNS server performance, validating DNS configurations, and incorporating DNS resolution into your load testing scenarios.
11+
The `k6/x/dns` module enables DNS resolution testing in k6, allowing you to resolve DNS names to IP addresses using custom DNS servers or the system's default DNS configuration. This module is useful for testing DNS server performance, validating DNS configurations, and incorporating DNS resolution into your load testing scenarios.
1212

1313
## Key features
1414

docs/sources/k6/next/javascript-api/k6-x-dns/lookup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ The `dns.lookup` function performs DNS resolution using the system's default DNS
1212

1313
| Parameter | Type | Description |
1414
| :-------- | :----- | :------------------------------------------------------------------------ |
15-
| hostname | string | The domain name to resolve (e.g., "example.com", "k6.io") |
15+
| hostname | string | The domain name to resolve. For example, "example.com" or "k6.io". |
1616

1717
## Returns
1818

1919
A promise resolving to an array of strings, where each string is an IP address that the domain name resolves to. The function returns the same IP addresses that would be returned by the system's standard DNS resolution mechanism.
2020

21-
## Emitted metrics
21+
## Metrics
2222

2323
When using `dns.lookup`, the following metrics are automatically generated:
2424

docs/sources/k6/next/javascript-api/k6-x-dns/resolve.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ The `dns.resolve` function performs DNS resolution using a specified DNS server
1212

1313
| Parameter | Type | Description |
1414
| :--------- | :----- | :-------------------------------------------------------------------------------------------------------------- |
15-
| query | string | The domain name to resolve (e.g., "example.com", "k6.io") |
15+
| query | string | The domain name to resolve. For example, "example.com" or "k6.io". |
1616
| recordType | string | The DNS record type to query. Supported values: "A" (IPv4 addresses), "AAAA" (IPv6 addresses) |
17-
| nameserver | string | The DNS server to use for resolution in the format "host:port" (e.g., "8.8.8.8:53", "[2606:4700:4700::1111]:53") |
17+
| nameserver | string | The DNS server to use for resolution in the format "host:port". For example, "8.8.8.8:53" or "[2606:4700:4700::1111]:53" |
1818

1919
## Returns
2020

@@ -173,9 +173,8 @@ When using `dns.resolve`, the following metrics are automatically generated:
173173

174174
These metrics help you monitor DNS performance and identify potential bottlenecks in your testing scenarios.
175175

176-
## Notes on Usage
176+
## Best practices
177177

178-
- **Nameserver format**: Always specify the port number (typically 53 for DNS) in the nameserver parameter
179-
- **Record type support**: Currently supports "A" and "AAAA" record types; additional types may be added in future versions
180-
- **Timeout behavior**: DNS queries have built-in timeouts; consider this when designing load tests
181-
- **Load testing**: Use multiple VUs and iterations to properly test DNS server performance under load
178+
- **Nameserver format**: Always specify the port number, typically 53 for DNS, in the nameserver parameter.
179+
- **Timeout behavior**: DNS queries have built-in timeouts; consider this when designing load tests.
180+
- **Load testing**: Use multiple VUs and iterations to properly test DNS server performance under load.

docs/sources/k6/next/shared/extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ title: Extension module admonition
44

55
{{< admonition type="note">}}
66

7-
This module is implemented as an official extension and is available natively in k6, requiring no additional installation or build steps thanks to native extensions support. See the [extensions documentation](/docs/k6/<K6_VERSION>/extensions/explore) for available extensions and details.
7+
This module is implemented as an official extension and is available natively in k6, requiring no additional installation or build steps. Refer to the [extensions documentation](/docs/k6/<K6_VERSION>/extensions/explore) for available extensions and details.
88

99
{{< /admonition >}}

0 commit comments

Comments
 (0)