forked from smithy-lang/smithy-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc98470
commit 670b873
Showing
20 changed files
with
544 additions
and
36 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tools/compile_time_benchmark/config/batch/create_compute_environment.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
compute_environment_name = "smithy_rs_benchmark" | ||
type = "Managed" | ||
state = "Enabled" | ||
|
||
#service_role = null | ||
|
||
[compute_resource] | ||
type = "Ec2" | ||
allocation_strategy = "BEST_FIT" | ||
minv_cpus = 0 | ||
maxv_cpus = 256 | ||
instance_types = ["c7g.2xlarge"] | ||
instance_role = "SmithyRs_CompileTimeBenchmarking_Ec2Role" | ||
|
||
[compute_resource.launch_template] | ||
launch_template_name = "smithy_rs_benchmarking" | ||
version = "1" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"smithy-rs" = "tools_compile_time_benchmark" |
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
tools/compile_time_benchmark/config/create_compute_environment.toml
This file was deleted.
Oops, something went wrong.
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
tools/compile_time_benchmark/config/ec2/create_launch_template.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
launch_template_name = "smithy_rs_benchmark_launch_template" | ||
version_Description = "Template for c7.2xlarge instance. Change the instance type if AWS stops offering c7." | ||
|
||
[[template_tags]] | ||
key = "smithy-rs" | ||
value = "" | ||
|
||
[launch_template_data] | ||
image_id = "ami-05bfbece1ed5beb54" | ||
ebs_optimized = true | ||
user_data = "" | ||
instance_type = "C7g2Xlarge" | ||
|
||
[launch_template_data.iam_instance_profile] | ||
name = "smithy_rs_compilation_benchmark_role" | ||
|
||
[launch_template_data.block_device_mappings] | ||
|
||
[launch_template_data.network_interfaces] | ||
|
||
[launch_template_data.network_interfaces] | ||
|
||
|
||
[[tag_specifications]] | ||
resource_type = "Instance" | ||
key = "smithy-rs" | ||
value = " | ||
# ebs | ||
[volumes] | ||
device_name = "/dev/xvda" | ||
volume_type = "gp2" | ||
size = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
role_name = "smithy_rs_compilation_benchmark_role" | ||
description = "Compile time benchmark role for smithy-rs." | ||
assume_role_policy_document = "AwsBatchFullAccess" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
user_name = "SmithyRsBenchmarkUser" | ||
permission_boundary = "AWSBatchFullAccess" |
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
tools/compile_time_benchmark/config/resource_group/create_resource_group.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name = "smithy_rs_compilation_benchmark_resource_group" | ||
description = """ | ||
Resources for benchmarking smithy-rs's compile time. | ||
Resources here is created by `compile_time_benchmark` tool which you can find it on smithy-rs repository. | ||
""" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:DescribeAccountAttributes", | ||
"ec2:DescribeInstances", | ||
"ec2:DescribeInstanceStatus", | ||
"ec2:DescribeInstanceAttribute", | ||
"ec2:DescribeSubnets", | ||
"ec2:DescribeSecurityGroups", | ||
"ec2:DescribeKeyPairs", | ||
"ec2:DescribeImages", | ||
"ec2:DescribeImageAttribute", | ||
"ec2:DescribeSpotInstanceRequests", | ||
"ec2:DescribeSpotFleetInstances", | ||
"ec2:DescribeSpotFleetRequests", | ||
"ec2:DescribeSpotPriceHistory", | ||
"ec2:DescribeVpcClassicLink", | ||
"ec2:DescribeLaunchTemplateVersions", | ||
"ec2:CreateLaunchTemplate", | ||
"ec2:DeleteLaunchTemplate", | ||
"ec2:RequestSpotFleet", | ||
"ec2:CancelSpotFleetRequests", | ||
"ec2:ModifySpotFleetRequest", | ||
"ec2:TerminateInstances", | ||
"ec2:RunInstances", | ||
"autoscaling:DescribeAccountLimits", | ||
"autoscaling:DescribeAutoScalingGroups", | ||
"autoscaling:DescribeLaunchConfigurations", | ||
"autoscaling:DescribeAutoScalingInstances", | ||
"autoscaling:CreateLaunchConfiguration", | ||
"autoscaling:CreateAutoScalingGroup", | ||
"autoscaling:UpdateAutoScalingGroup", | ||
"autoscaling:SetDesiredCapacity", | ||
"autoscaling:DeleteLaunchConfiguration", | ||
"autoscaling:DeleteAutoScalingGroup", | ||
"autoscaling:CreateOrUpdateTags", | ||
"autoscaling:SuspendProcesses", | ||
"autoscaling:PutNotificationConfiguration", | ||
"autoscaling:TerminateInstanceInAutoScalingGroup", | ||
"ecs:DescribeClusters", | ||
"ecs:DescribeContainerInstances", | ||
"ecs:DescribeTaskDefinition", | ||
"ecs:DescribeTasks", | ||
"ecs:ListAccountSettings", | ||
"ecs:ListClusters", | ||
"ecs:ListContainerInstances", | ||
"ecs:ListTaskDefinitionFamilies", | ||
"ecs:ListTaskDefinitions", | ||
"ecs:ListTasks", | ||
"ecs:CreateCluster", | ||
"ecs:DeleteCluster", | ||
"ecs:RegisterTaskDefinition", | ||
"ecs:DeregisterTaskDefinition", | ||
"ecs:RunTask", | ||
"ecs:StartTask", | ||
"ecs:StopTask", | ||
"ecs:UpdateContainerAgent", | ||
"ecs:DeregisterContainerInstance", | ||
"logs:CreateLogGroup", | ||
"logs:CreateLogStream", | ||
"logs:PutLogEvents", | ||
"logs:DescribeLogGroups", | ||
"iam:GetInstanceProfile", | ||
"iam:GetRole" | ||
], | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": "ecs:TagResource", | ||
"Resource": [ | ||
"arn:aws:ecs:*:*:task/*_Batch_*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": "iam:PassRole", | ||
"Resource": [ | ||
"*" | ||
], | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:PassedToService": [ | ||
"ec2.amazonaws.com", | ||
"ec2.amazonaws.com.cn", | ||
"ecs-tasks.amazonaws.com" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": "iam:CreateServiceLinkedRole", | ||
"Resource": "*", | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:AWSServiceName": [ | ||
"spot.amazonaws.com", | ||
"spotfleet.amazonaws.com", | ||
"autoscaling.amazonaws.com", | ||
"ecs.amazonaws.com" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:CreateTags" | ||
], | ||
"Resource": [ | ||
"*" | ||
], | ||
"Condition": { | ||
"StringEquals": { | ||
"ec2:CreateAction": "RunInstances" | ||
} | ||
} | ||
} | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# What's this? | ||
|
||
This is a cli app that let's you to benchmark the compile time. | ||
It is part of RFC30. | ||
|
||
|
||
# Directories | ||
|
||
# Constance | ||
SmithyRs | ||
SmithyRsBenchmark | ||
|
||
IAM PROFILE NAME: SmithyRsIAMProfileForEC2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters