-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Rust TransferManager Upload File #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, nice work.
let key = &task_config.key; | ||
|
||
let stream = if self.config().workload.files_on_disk { | ||
InputStream::from_path(key).with_context(|| "Failed to create stream")? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the key
actually the path here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, key and path are supposed to be the same. https://github.com/awslabs/aws-crt-s3-benchmarks/blob/main/workloads/download-30GiB-1x.run.json#L11
let random_data_for_upload: Bytes = { | ||
let mut rng = fastrand::Rng::new(); | ||
let data: Vec<u8> = repeat_with(|| rng.u8(..)).take(upload_data_size).collect(); | ||
data.into() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: I know in the C-runner, it's a big noticeable pause when filling a 100GiB buffer with random data. Would this go faster if we asked for random 64bit numbers? Or used a different library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.