Skip to content

Commit

Permalink
Increase debug logs to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Edwards committed Dec 31, 2024
1 parent 2f5cee3 commit 9cdc7fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Crypter.Common.Client/Transfer/Handlers/UploadFileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ async IAsyncEnumerable<Func<MemoryStream>> SplitEncryptionStreamAsync(Encryption
}

double factor = ClientTransferSettings.TargetMultipartUploadMilliseconds / loopStopwatch.Elapsed.TotalMilliseconds;
_logger.LogDebug("Factor: {factor}, TargetMultipartUploadMilliseconds: {target}, ElapsedMilliseconds: {elapsed}", factor, ClientTransferSettings.TargetMultipartUploadMilliseconds, loopStopwatch.Elapsed.TotalMilliseconds);
_logger.LogWarning("Factor: {factor}, TargetMultipartUploadMilliseconds: {target}, ElapsedMilliseconds: {elapsed}", factor, ClientTransferSettings.TargetMultipartUploadMilliseconds, loopStopwatch.Elapsed.TotalMilliseconds);

int optimalBlocksPerRequest = Convert.ToInt32(blocksPerRequest * factor);
_logger.LogDebug("Optimal blocks per request: {optimalValue}", optimalBlocksPerRequest);
_logger.LogWarning("Optimal blocks per request: {optimalValue}", optimalBlocksPerRequest);

int lowerBound = Math.Max(ClientTransferSettings.InitialMultipartReadBlocks, optimalBlocksPerRequest);
blocksPerRequest = Math.Min(ClientTransferSettings.MaximumMultipartReadBlocks, lowerBound);
_logger.LogDebug("Blocks per next request: {blocks}", blocksPerRequest);
_logger.LogWarning("Blocks per next request: {blocks}", blocksPerRequest);
} while (!endOfStream);
}
}
Expand Down

0 comments on commit 9cdc7fa

Please sign in to comment.