mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-13 11:34:54 +00:00
Merge pull request #564 from nrb/backup-timing
Record backup start and completion times, add timing metrics
This commit is contained in:
@@ -162,9 +162,22 @@ func DescribeBackupStatus(d *Describer, status v1.BackupStatus) {
|
||||
d.Printf("Backup Format Version:\t%d\n", status.Version)
|
||||
|
||||
d.Println()
|
||||
d.Printf("Expiration:\t%s\n", status.Expiration.Time)
|
||||
// "<n/a>" output should only be applicable for backups that failed validation
|
||||
if status.StartTimestamp.Time.IsZero() {
|
||||
d.Printf("Started:\t%s\n", "<n/a>")
|
||||
} else {
|
||||
d.Printf("Started:\t%s\n", status.StartTimestamp.Time)
|
||||
}
|
||||
if status.CompletionTimestamp.Time.IsZero() {
|
||||
d.Printf("Completed:\t%s\n", "<n/a>")
|
||||
} else {
|
||||
d.Printf("Completed:\t%s\n", status.CompletionTimestamp.Time)
|
||||
}
|
||||
|
||||
d.Println()
|
||||
d.Printf("Expiration:\t%s\n", status.Expiration.Time)
|
||||
d.Println()
|
||||
|
||||
d.Printf("Validation errors:")
|
||||
if len(status.ValidationErrors) == 0 {
|
||||
d.Printf("\t<none>\n")
|
||||
|
||||
Reference in New Issue
Block a user