Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Aug 12, 2024
1 parent 01e3e2a commit 4ca8c9f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions runners/s3-benchrunner-rust/src/transfer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ use tokio::task::JoinSet;

use crate::{
BenchmarkConfig, Result, RunBenchmark, RunnerError, TaskAction, TaskConfig, PART_SIZE,

};
use bytes::Bytes;


/// Benchmark runner using aws-s3-transfer-manager
#[derive(Clone)]
pub struct TransferManagerRunner {
Expand Down Expand Up @@ -46,7 +44,9 @@ impl TransferManagerRunner {
let upload_data_size: usize = if config.workload.files_on_disk {
0
} else {
config.workload.tasks
config
.workload
.tasks
.iter()
.filter(|task| task.action == TaskAction::Upload)
.map(|task| task.size)
Expand All @@ -56,7 +56,7 @@ impl TransferManagerRunner {
.unwrap()
};
let random_data_for_upload: Bytes = {
let mut data = Vec::new();
let mut data = Vec::new();
data.resize_with(upload_data_size, rand::random::<u8>);
data.into()
};
Expand Down Expand Up @@ -145,10 +145,9 @@ impl TransferManagerRunner {

let stream = match self.config().workload.files_on_disk {
true => InputStream::from_path(key).with_context(|| "Failed to create stream")?,
false => self.handle.random_data_for_upload.clone().into(),
false => self.handle.random_data_for_upload.clone().into(),
};


self.handle
.transfer_manager
.upload()
Expand Down

0 comments on commit 4ca8c9f

Please sign in to comment.