Skip to content

Conversation

@luke-lombardi
Copy link
Contributor

Improves read speeds from this:

2024/12/17 21:09:34 Initial file len: 1048576000
2024/12/17 21:09:34 Response content len: 1048576000
2024/12/17 21:09:34 Hash of initial file: 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:09:34 Hash of stored content: 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:09:34 Hash of retrieved content: 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:09:34 Iteration 1: content length: 1048576000, file length: 1048576000, elapsed time: 2.228790 seconds
2024/12/17 21:09:37 Direct byte comparison found no differences.
2024/12/17 21:09:38 bytes.Equal confirms the slices are equal.
2024/12/17 21:09:38 Average MB/s rate of reading (GetContent): 448.674019

to this:

2024/12/17 21:27:32 Getting content stream for 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:27:35 Received EOF, ending stream
2024/12/17 21:27:35 Closing content channel
2024/12/17 21:27:35 Content channel closed, exiting loop
2024/12/17 21:27:35 Getting content stream for 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:27:37 Received EOF, ending stream
2024/12/17 21:27:37 Closing content channel
2024/12/17 21:27:37 Content channel closed, exiting loop
2024/12/17 21:27:37 Getting content stream for 0693cfe12235e1f11c34cb6e327c14b9b9d3ef23d66ad4e3bb128c4e376e1950
2024/12/17 21:27:39 Received EOF, ending stream
2024/12/17 21:27:39 Closing content channel
2024/12/17 21:27:39 Content channel closed, exiting loop
2024/12/17 21:27:39 Average MB/s rate of reading (GetContent): 1313.404790

This is only useful for sequential reads.

@luke-lombardi luke-lombardi force-pushed the ll/streaming-getcontent branch from 23de4f0 to 9a8501b Compare January 11, 2025 13:30
@luke-lombardi luke-lombardi force-pushed the ll/streaming-getcontent branch from 9a8501b to 9380cdb Compare January 11, 2025 13:57
@luke-lombardi luke-lombardi merged commit 45db59e into master Jan 11, 2025
@luke-lombardi luke-lombardi deleted the ll/streaming-getcontent branch January 11, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants