From ab7abd96867b07ad8c716cf24bdf2b8da0218c2f Mon Sep 17 00:00:00 2001 From: Calistoc Date: Sat, 2 Jan 2021 17:54:17 +0100 Subject: [PATCH] status: show the current replication attempt's runtime --- client/status/viewmodel/render.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/status/viewmodel/render.go b/client/status/viewmodel/render.go index 28bc71a..4edf49e 100644 --- a/client/status/viewmodel/render.go +++ b/client/status/viewmodel/render.go @@ -336,6 +336,12 @@ func renderReplicationReport(t *stringbuilder.B, rep *report.Report, history *by t.Printf("Status: %s", latest.State) t.Newline() + if !latest.FinishAt.IsZero() { + t.Printf("Last Run: %s (lasted %s)\n", latest.FinishAt.Round(time.Second), latest.FinishAt.Sub(latest.StartAt).Round(time.Second)) + } else { + t.Printf("Started: %s (lasting %s)\n", latest.StartAt.Round(time.Second), time.Since(latest.StartAt).Round(time.Second)) + } + if latest.State == report.AttemptPlanningError { t.Printf("Problem: ") t.PrintfDrawIndentedAndWrappedIfMultiline("%s", latest.PlanError)