Skip to content

Commit 97078ce

Browse files
authored
chore: add more bundle types to the benchmark (#7392)
* chore: add more bundle types to the benchmark * chore: more application types in bundle benchmark
1 parent d0a9cd8 commit 97078ce

File tree

10 files changed

+40
-1
lines changed

10 files changed

+40
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { NormalizedSchema } from "@smithy/core/schema";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export {
2+
AwsRestJsonProtocol,
3+
AwsEc2QueryProtocol,
4+
AwsJsonRpcProtocol,
5+
AwsRestXmlProtocol,
6+
AwsJson1_0Protocol,
7+
AwsJson1_1Protocol,
8+
AwsSmithyRpcV2CborProtocol,
9+
AwsQueryProtocol,
10+
} from "@aws-sdk/core/protocols";

tests/bundlers/applications/inactive/.gitkeep

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export { EC2ProtocolClient } from "@aws-sdk/aws-protocoltests-ec2";
2+
export { JsonProtocolClient } from "@aws-sdk/aws-protocoltests-json";
3+
export { JSONRPC10Client } from "@aws-sdk/aws-protocoltests-json-10";
4+
export { MachineLearningClient } from "@aws-sdk/aws-protocoltests-json-machinelearning";
5+
export { QueryProtocolClient } from "@aws-sdk/aws-protocoltests-query";
6+
export { RestJsonProtocolClient } from "@aws-sdk/aws-protocoltests-restjson";
7+
export { GlacierClient } from "@aws-sdk/aws-protocoltests-restjson-glacier";
8+
export { APIGatewayClient } from "@aws-sdk/aws-protocoltests-restjson-apigateway";
9+
export { RestXmlProtocolClient } from "@aws-sdk/aws-protocoltests-restxml";
10+
export { RpcV2ProtocolClient } from "@aws-sdk/aws-protocoltests-smithy-rpcv2-cbor";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export { EC2ProtocolClient } from "@aws-sdk/aws-protocoltests-ec2-schema";
2+
export { JsonProtocolClient } from "@aws-sdk/aws-protocoltests-json-schema";
3+
export { JSONRPC10Client } from "@aws-sdk/aws-protocoltests-json-10-schema";
4+
export { MachineLearningClient } from "@aws-sdk/aws-protocoltests-json-schema-machinelearning";
5+
export { QueryProtocolClient } from "@aws-sdk/aws-protocoltests-query-schema";
6+
export { RestJsonProtocolClient } from "@aws-sdk/aws-protocoltests-restjson-schema";
7+
export { GlacierClient } from "@aws-sdk/aws-protocoltests-restjson-schema-glacier";
8+
export { APIGatewayClient } from "@aws-sdk/aws-protocoltests-restjson-schema-apigateway";
9+
export { RestXmlProtocolClient } from "@aws-sdk/aws-protocoltests-restxml-schema";
10+
export { RpcV2ProtocolClient } from "@aws-sdk/aws-protocoltests-smithy-rpcv2-cbor-schema";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { AwsRestXmlProtocol } from "@aws-sdk/core/protocols";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { AwsJson1_1Protocol } from "@aws-sdk/core/protocols";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { AwsRestXmlProtocol } from "@aws-sdk/core/protocols";

tests/bundlers/runner/BundlerSizeBenchmarker.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ export class BundlerSizeBenchmarker {
9797

9898
await esbuild.build({
9999
entryPoints: [entryPoint],
100+
platform: "browser",
100101
bundle: true,
101102
minify: true,
103+
mainFields: ["browser", "module", "main"],
102104
outfile: outfile,
103105
format: "esm",
104-
target: "es2015",
106+
target: "es2022",
105107
});
106108

107109
const stat = fs.statSync(outfile);

tests/bundlers/runner/run.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const applicationFolder = path.join(__dirname, "..", "applications");
1212
const report = new ReportMarkdown();
1313

1414
for (const app of fs.readdirSync(applicationFolder)) {
15+
if (fs.lstatSync(path.join(applicationFolder, app)).isDirectory()) {
16+
continue;
17+
}
1518
const benchmarker = new BundlerSizeBenchmarker({ application: app });
1619

1720
const stat = await benchmarker.all();

0 commit comments

Comments
 (0)