Refactor restore process: remove internal profiling logging and update cache size tracking in VolumeManager

This commit is contained in:
aureliandevel
2026-04-10 08:21:02 +10:00
parent ee3dbcd97a
commit 7e4ac31502
2 changed files with 1 additions and 8 deletions
-8
View File
@@ -169,14 +169,6 @@ namespace Duplicati.Library.Main
result.OperationProgressUpdater.UpdatePhase(OperationPhase.Restore_Complete);
result.EndTime = DateTime.UtcNow;
if (m_options.InternalProfiling)
{
Logging.Log.WriteProfilingMessage(LOGTAG, "RestoreDataFlow",
"Restore downloaded {0} and restored {1}",
Duplicati.Library.Utility.Utility.FormatSizeString(result.BackendStatistics.BytesDownloaded),
Duplicati.Library.Utility.Utility.FormatSizeString(result.SizeOfRestoredFiles));
}
UsageReporter.Reporter.Report("RESTORE_FILECOUNT", result.RestoredFiles);
UsageReporter.Reporter.Report("RESTORE_FILESIZE", result.SizeOfRestoredFiles);
UsageReporter.Reporter.Report("RESTORE_DURATION", (long)result.Duration.TotalSeconds);
@@ -281,6 +281,7 @@ namespace Duplicati.Library.Main.Operation.Restore
Logging.Log.WriteExplicitMessage(LOGTAG, "VolumeRequest", "Caching volume {0} in unlimited mode (free space: {1})", volume_id, available_free_space);
cache[volume_id] = volume;
cache_size += volume.Size;
cache_size_max_consumed = Math.Max(cache_size_max_consumed, cache_size);
}
cache_last_touched.Add(volume_id);
sw_cache_set?.Stop();