Skip to content
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

Transfer speeds reported by progress callback incorrect #27

Open
logiclrd opened this issue May 26, 2024 · 1 comment
Open

Transfer speeds reported by progress callback incorrect #27

logiclrd opened this issue May 26, 2024 · 1 comment

Comments

@logiclrd
Copy link

I have a project now uploading files to B2 using both the simple .Files.UploadAsync and the chunked .Parts functions, and the progress callbacks I'm getting have some really weird-looking values in BytesPerSecond. They seem to be approximately 100 times too large. For instance, an upload of a ~25 MB file takes about 2 minutes here, and the entire time I'm getting progress updates telling me it's going at 15 MB/second, give or take. Am I doing something wrong??

@logiclrd
Copy link
Author

I just took a peek at what's going on the code. I see it's using Stopwatch and then dividing the length of each buffer it transfers by the amount of time that has elapsed. I wonder if for short intervals, the Stopwatch is reporting values that are smaller than they should be, artificially inflating the speed? Or, perhaps the write operation is being heavily buffered?

I am running this on .NET 8.0 on Linux.

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

No branches or pull requests

1 participant