Skip to content

Commit

Permalink
Update dependencies and build tools (#3554)
Browse files Browse the repository at this point in the history
This PR updates all the dependency lock files, upgrades the S3
throughput benchmark to SDK 1.x, and updates the build image
dependencies.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Apr 12, 2024
1 parent b1cbce6 commit 322e20c
Show file tree
Hide file tree
Showing 19 changed files with 4,070 additions and 8,264 deletions.

Large diffs are not rendered by default.

1,191 changes: 625 additions & 566 deletions aws/sdk/benchmarks/previous-release-comparison/Cargo.lock

Large diffs are not rendered by default.

1,305 changes: 767 additions & 538 deletions aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.lock

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions aws/sdk/benchmarks/s3-throughput/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ repository = "https://github.com/smithy-lang/smithy-rs"
publish = false

[dependencies]
aws-config = "0.55.3"
aws-sdk-s3 = "0.28.0"
aws-smithy-http = "0.55.3"
aws-smithy-client= { version = "0.55.3", features = ["client-hyper"] }
aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1"
clap = { version = "4.3.2", default-features = false, features = ["derive", "std", "help"] }
tokio = { version = "1.28.2", features = ["full"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
Expand Down
2 changes: 1 addition & 1 deletion aws/sdk/benchmarks/s3-throughput/benchmark/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async fn benchmark_get_object(client: &SdkConfig, args: &Args) -> Result<Latenci
type Setup = Client;

async fn prepare(&self, conf: &SdkConfig) -> Self::Setup {
Client::new(&conf)
Client::new(conf)
}

async fn do_get(
Expand Down
17 changes: 7 additions & 10 deletions aws/sdk/benchmarks/s3-throughput/benchmark/src/multipart_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::{Args, BoxError, BENCH_KEY};
use async_trait::async_trait;
use aws_config::SdkConfig;
use aws_sdk_s3 as s3;
use aws_sdk_s3::primitives::AggregatedBytes;
use aws_sdk_s3::Client;
use aws_smithy_types::byte_stream::AggregatedBytes;
use std::fmt;
use std::fs::File;
use std::os::unix::fs::FileExt;
Expand All @@ -34,7 +34,7 @@ impl GetBenchmark for GetObjectMultipart {
type Setup = Vec<Client>;

async fn prepare(&self, conf: &SdkConfig) -> Self::Setup {
let clients = (0..32).map(|_| Client::new(&conf)).collect::<Vec<_>>();
let clients = (0..32).map(|_| Client::new(conf)).collect::<Vec<_>>();
for client in &clients {
let _ = client.list_buckets().send().await;
}
Expand All @@ -59,22 +59,19 @@ pub async fn get_object_multipart(
bucket: &str,
key: &str,
) -> Result<(), BoxError> {
let mut part_count = (args.size_bytes / args.part_size_bytes + 1) as u64;
let mut size_of_last_part = (args.size_bytes % args.part_size_bytes) as u64;
let mut part_count = args.size_bytes / args.part_size_bytes + 1;
let mut size_of_last_part = args.size_bytes % args.part_size_bytes;
if size_of_last_part == 0 {
size_of_last_part = args.part_size_bytes as u64;
size_of_last_part = args.part_size_bytes;
part_count -= 1;
}

let ranges = (0..part_count).map(|i| {
if i == part_count - 1 {
let start = i * args.part_size_bytes as u64;
let start = i * args.part_size_bytes;
ContentRange::new(start, start + size_of_last_part - 1)
} else {
ContentRange::new(
i * args.part_size_bytes as u64,
(i + 1) * args.part_size_bytes as u64 - 1,
)
ContentRange::new(i * args.part_size_bytes, (i + 1) * args.part_size_bytes - 1)
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{Args, BoxError, BENCH_KEY};
use async_trait::async_trait;
use aws_config::SdkConfig;
use aws_sdk_s3 as s3;
use aws_sdk_s3::primitives::ByteStream;
use aws_sdk_s3::Client;
use aws_smithy_types::byte_stream::ByteStream;
use s3::types::CompletedMultipartUpload;
use s3::types::CompletedPart;
use std::io::SeekFrom;
Expand All @@ -29,7 +29,7 @@ impl PutBenchmark for PutObjectMultipart {
type Setup = Vec<Client>;

async fn prepare(&self, conf: &SdkConfig) -> Self::Setup {
let clients = (0..32).map(|_| Client::new(&conf)).collect::<Vec<_>>();
let clients = (0..32).map(|_| Client::new(conf)).collect::<Vec<_>>();
for client in &clients {
let _ = client.list_buckets().send().await;
}
Expand Down Expand Up @@ -112,6 +112,7 @@ pub async fn put_object_multipart(
Ok(())
}

#[allow(clippy::too_many_arguments)]
async fn upload_part_retry_on_timeout(
permit: OwnedSemaphorePermit,
client: s3::Client,
Expand Down
Loading

0 comments on commit 322e20c

Please sign in to comment.