Skip to content

Commit a94ee5e

Browse files
committed
706-Add: progress
TB/hr rate
1 parent 00386a9 commit a94ee5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backup/backup.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,14 @@ func Backup(pctx context.Context, jobInfo *files.JobInfo) error {
419419
} else {
420420
fmt.Fprintf(
421421
config.Stdout,
422-
"Done.\n\tTotal ZFS Stream Bytes: %d (%s)\n\tTotal Bytes Written: %d (%s)\n\tElapsed Time: %v\n\tTotal Files Uploaded: %d\n\tAverage Upload Rate: %s/TB\n",
422+
"Done.\n\tTotal ZFS Stream Bytes: %d (%s)\n\tTotal Bytes Written: %d (%s)\n\tElapsed Time: %v\n\tTotal Files Uploaded: %d\n\tAverage Upload Rate: %s\n",
423423
jobInfo.ZFSStreamBytes,
424424
humanize.IBytes(jobInfo.ZFSStreamBytes),
425425
totalWrittenBytes,
426426
humanize.IBytes(totalWrittenBytes),
427427
time.Since(jobInfo.StartTime),
428428
len(jobInfo.Volumes)+1,
429-
humanize.IBytes(uint64(float64(totalWrittenBytes)/time.Since(jobInfo.StartTime).Hours()/1024)),
429+
fmt.Sprintf("%.2f TB/hr", float64(totalWrittenBytes)/1e12/time.Since(jobInfo.StartTime).Hours()),
430430
)
431431
}
432432

0 commit comments

Comments
 (0)