Skip to content

Commit a811b34

Browse files
authored
Merge pull request #1145 from grafana/aws/document-blocking-behavior
Document AWS synchronous behavior and performance considerations
2 parents 6e6912e + 574f337 commit a811b34

File tree

9 files changed

+44
-4
lines changed

9 files changed

+44
-4
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import Blockquote from 'components/shared/blockquote';
2+
import React from 'react';
3+
4+
const BlockingAwsBlockquote = () => (
5+
<Blockquote
6+
mod="Attention"
7+
title="Performance considerations and recommended practices"
8+
>
9+
The APIs provided by this jslib operate synchronously, which means k6 must
10+
wait for operations that use the client classes to finish before proceeding
11+
with the rest of the script.
12+
<p>
13+
In some cases, such as downloading large files from S3, this could affect
14+
performance and test results. To minimize the impact on test performance,
15+
we recommend using these operations in the
16+
<span className="code-inline">setup</span> and{' '}
17+
<span className="code-inline">teardown</span>{' '}
18+
<a href="/using-k6/test-lifecycle/">lifecycle functions</a>. These
19+
functions run before and after the test run and thus do not influence test
20+
results.
21+
</p>
22+
</Blockquote>
23+
);
24+
25+
export default BlockingAwsBlockquote;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import BlockingAwsBlockquote from './blocking-aws-blockquote.view';
2+
3+
export default BlockingAwsBlockquote;

src/components/templates/doc-page/doc-page-content/doc-page-content.view.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import classNames from 'classnames';
22
import { HtmlContent } from 'components/blocks/html-content';
33
import Glossary from 'components/pages/doc-page/glossary';
44
import TableOfContents from 'components/pages/doc-page/table-of-contents';
5+
import BlockingAwsBlockquote from 'components/shared/blocking-aws-blockquote';
56
import Blockquote from 'components/shared/blockquote';
67
import BrowserClassList from 'components/shared/browser-class-list';
78
import BrowserDocsWIP from 'components/shared/browser-docs-wip';
@@ -39,6 +40,7 @@ const componentsForNativeReplacement = {
3940
BrowserClassList,
4041
BrowserWIP,
4142
ExperimentalBlockquote,
43+
BlockingAwsBlockquote,
4244
InstallationInstructions,
4345
Tooltip,
4446
BNIT,

src/data/markdown/docs/20 jslib/01 jslib/01 aws.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ This documentation is for the last version only. If you discover that some code
3333

3434
| Library | Description |
3535
| :--------------------------------------------------------------------- | :------------------------------------------------------------------- |
36+
| [AWSConfig](/javascript-api/jslib/aws/awsconfig) | Class to configure AWS client classes. |
37+
| [KMSClient](/javascript-api/jslib/aws/kmsclient) | Client class to interact with AWS Key Management Service. |
3638
| [S3Client](/javascript-api/jslib/aws/s3client) | Client class to interact with AWS S3 buckets and objects. |
3739
| [SecretsManager](/javascript-api/jslib/aws/secretsmanagerclient) | Client class to interact with AWS secrets stored in Secrets Manager. |
38-
| [KMSClient](/javascript-api/jslib/aws/kmsclient) | Client class to interact with AWS Key Management Service. |
3940
| [SQSClient](/javascript-api/jslib/aws/sqsclient) | Client class to interact with AWS Simple Queue Service. |
40-
| [SystemsManagerClient](/javascript-api/jslib/aws/systemsmanagerclient) | Client class to interact with AWS Systems Manager Service. |
41-
| [AWSConfig](/javascript-api/jslib/aws/awsconfig) | Class to configure AWS client classes. |
41+
| [SystemsManagerClient](/javascript-api/jslib/aws/systemsmanagerclient) | Client class to interact with AWS Systems Manager Service. |

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 KMSClient.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: 'KMSClient allows interacting with the AWS Key Management Service'
55
excerpt: 'KMSClient allows interacting with the AWS Key Management Service'
66
---
77

8+
<BlockingAwsBlockquote />
9+
810
`KMSClient` interacts with the AWS Key Management Service.
911
With it, the user can list all the Key Management Service keys in the caller's AWS account and region. They can also generate symmetric data keys to use outside of AWS Key Management Service. `KMSClient` operations are blocking. k6 recommends reserving their use to the [`setup`](/using-k6/test-lifecycle/) and [`teardown`](/using-k6/test-lifecycle/) stages as much as possible.
1012

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 S3Client.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: 'S3Client allows interacting with AWS S3 buckets and objects'
55
excerpt: 'S3Client class allows interacting with AWS S3 buckets and objects'
66
---
77

8+
<BlockingAwsBlockquote />
9+
810
S3Client allows interacting with AWS S3's buckets and objects. Namely, it allows the user to list buckets and the objects they contain, as well as download, uploading, and deleting objects. The S3Client operations are blocking, and we recommend reserving their usage to the [`setup`](/using-k6/test-lifecycle/) and [`teardown`](/using-k6/test-lifecycle/) functions as much as possible.
911

1012
S3Client is included in both the dedicated jslib `s3.js` bundle, and the `aws.js` one, containing all the services clients.

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 SQSClient.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ description: 'SQSClient enables interaction with the AWS Simple Queue Service (S
55
excerpt: 'SQSClient allows interacting with the AWS Simple Queue Service (SQS)'
66
---
77

8-
`SQSClient` interacts with the AWS Simple Queue Service (SQS). With it, the user can send messages to specified queues and list available queues in the current region. `SQSClient` operations are blocking. k6 recommends reserving their use for the [`setup`](/using-k6/test-lifecycle/) and [`teardown`](/using-k6/test-lifecycle/) stages as much as possible.
8+
<BlockingAwsBlockquote />
9+
10+
`SQSClient` interacts with the AWS Simple Queue Service (SQS). With it, the user can send messages to specified queues and list available queues in the current region. `SQSClient` operations are blocking.
911

1012
Both the dedicated `sqs.js` jslib bundle and the all-encompassing `aws.js` bundle include the `SQSClient`.
1113

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 SecretsManagerClient.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: 'SecretsManagerClient allows interacting with AWS secrets stored in
55
excerpt: 'SecretsManagerClient allows interacting with AWS secrets stored in Secrets Manager'
66
---
77

8+
<BlockingAwsBlockquote />
9+
810
SecretsManagerClient allows interacting with secrets stored in AWS's Secrets Manager. Namely, it allows the user to list, download, create, modify and delete secrets. Note that the SecretsManagerClient operations are blocking, and we recommend reserving their usage to the [`setup`](/using-k6/test-lifecycle/) and [`teardown`](/using-k6/test-lifecycle/) functions as much as possible.
911

1012
SecretsManagerClient is included in both the dedicated jslib `secrets-manager.js` bundle, and the `aws.js` one, containing all the services clients.

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 SystemsManagerClient.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: 'SystemsManagerClient allows interacting with the AWS Systems Manag
55
excerpt: 'SystemsManagerClient allows interacting with the AWS Systems Manager Service'
66
---
77

8+
<BlockingAwsBlockquote />
9+
810
`SystemsManagerClient` interacts with the AWS Systems Manager Service.
911
With it, the user can get parameters from the Systems Manager Service in the caller's AWS account and region. `SystemsManagerClient` operations are blocking. k6 recommends reserving their use to the [`setup`](/using-k6/test-lifecycle/) and [`teardown`](/using-k6/test-lifecycle/) stages as much as possible.
1012

0 commit comments

Comments
 (0)