diff options
author | Keuin <[email protected]> | 2021-01-26 22:04:38 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2021-01-26 22:04:38 +0800 |
commit | d3ea25a70a93d71b6f00941466faf3e9c691185f (patch) | |
tree | 4d7183832576b31affc5e6e558ef628d390600ed /src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java | |
parent | aa9843f18b3eff24c3c1ef8b6a2fd0d1d58e3b28 (diff) |
Show reused percentage of incremental backups.
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java b/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java index 4301adc..6661a27 100644 --- a/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java +++ b/src/main/java/com/keuin/kbackupfabric/backup/incremental/manager/IncCopyResult.java @@ -95,11 +95,12 @@ public class IncCopyResult { @Override public String toString() { return String.format( - "File(s) added: %d (%s in size, totally %d files). Total backup-ed files size: %s", + "File(s) added: %d (%s in size, totally %d files). Total backup-ed files size: %s (%.2f%% reused)", filesCopied, BackupFilesystemUtil.getFriendlyFileSizeString(bytesCopied), totalFiles, - BackupFilesystemUtil.getFriendlyFileSizeString(bytesTotal) + BackupFilesystemUtil.getFriendlyFileSizeString(bytesTotal), + (1 - 1.0f * bytesCopied / bytesTotal) * 100 ); } } |