feat: show step duration

This commit is contained in:
Jason Song
2022-11-01 18:14:20 +08:00
parent b4b22e78ad
commit b1da53286d
4 changed files with 51 additions and 2 deletions

View File

@@ -145,7 +145,7 @@ func ViewPost(ctx *context.Context) {
for i, v := range steps {
resp.StateData.CurrentJobSteps[i] = ViewJobStep{
Summary: v.Name,
Duration: float64(v.Stopped - v.Started),
Duration: float64(v.TakeTime() / time.Second),
Status: v.Status.String(),
}
}