[Refactor] Restructure code and add necessary tests#192
Merged
Ghass-M merged 6 commits intofeature/improve-upload-managementfrom Aug 26, 2025
Merged
Conversation
…-upload-management-measure-metrics # Conflicts: # src/ByteSync.Client/Business/Communications/Transfers/SliceUploadMetric.cs # src/ByteSync.Client/Business/Communications/Transfers/UploadProgressState.cs # src/ByteSync.Client/Services/Communications/Transfers/Uploading/FileSlicer.cs # src/ByteSync.Client/Services/Communications/Transfers/Uploading/FileUploadProcessor.cs # src/ByteSync.Client/Services/Communications/Transfers/Uploading/FileUploadWorker.cs # tests/ByteSync.Client.Tests/Services/Communications/Transfers/Uploading/FileSlicerMetricsTests.cs # tests/ByteSync.Client.Tests/Services/Communications/Transfers/Uploading/FileUploadWorkerMetricsTests.cs
|
paul-fresquet
approved these changes
Aug 25, 2025
c2b4704
into
feature/improve-upload-management
39 of 41 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
TaskIdto observe parallelism.LastExceptionwith aggregatedExceptionslist.Why
What changed
SliceUploadMetric:TaskId.DurationMs→ElapsedtimeMs.BandwidthKbps.UploadProgressState:LastException.Exceptionslist for error aggregation.FileSlicer/FileUploadWorker:LastException; append toExceptionsinstead.TaskId,PartNumber,Bytes,ElapsedtimeMsfor each slice.FileUploadProcessor:Upload_SliceAndParallelism_Testswith a stubIUploadStrategyandIFileTransferApiClientto:TaskIdcounts, and final uploaded length.UploadProgressStateunit tests to useExceptions(including null, different types, inner exceptions, messages).FileUploaderSliceTests(remove unused using).Breaking changes
SliceUploadMetric: property rename/removal and new property added.UploadProgressState:LastExceptionremoved in favor ofExceptions.