Skip to content

Commit

Permalink
Report progress 10 times less often
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Finkelshteyn authored Feb 6, 2019
1 parent 1b026f7 commit f63e56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion S3Download/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private static async Task DownloadAsync(string bucketName, string keyName, strin
static void DownloadPartProgressEvent(object sender, WriteObjectProgressArgs e)
{
_progressList[e.FilePath] = e.IsCompleted ? "Completed".PadRight(60) : $"{e.TransferredBytes:N}/{e.TotalBytes:N} bytes ({e.PercentDone.ToString()}% done)";
if (Interlocked.Increment(ref _displayCount) % 200 == 0 || e.IsCompleted)
if (Interlocked.Increment(ref _displayCount) % 2000 == 0 || e.IsCompleted)
{
foreach (var key in _progressList.Keys)
{
Expand Down

0 comments on commit f63e56b

Please sign in to comment.