Skip to content

Commit

Permalink
fix: make duration log consistent (#979)
Browse files Browse the repository at this point in the history
* make duration consistent

* Format dat whitespace

* Another durationMs converted
  • Loading branch information
mhan83 authored Nov 20, 2024
1 parent 9b5893e commit 84b47b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/saucecloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,9 @@ func (r *CloudRunner) uploadArchive(fileInfo storage.FileInfo, pType uploadType,
if err != nil {
return "", err
}
log.Info().Dur("durationMs", time.Since(start)).Str("storageId", resp.ID).
log.Info().
Str("duration", time.Since(start).Round(time.Second).String()).
Str("storageId", resp.ID).
Msgf("%s uploaded.", cases.Title(language.English).String(string(pType)))
return fmt.Sprintf("storage:%s", resp.ID), nil
}
Expand Down
5 changes: 4 additions & 1 deletion internal/saucecloud/retry/saucereportretrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ func (r *SauceReportRetrier) uploadConfig(filename string) (string, error) {
if err != nil {
return "", err
}
log.Info().Dur("durationMs", time.Since(start)).Str("storageId", resp.ID).Msg("Runner Config uploaded.")
log.Info().
Str("duration", time.Since(start).Round(time.Second).String()).
Str("storageId", resp.ID).
Msg("Runner Config uploaded.")

return resp.ID, nil
}
Expand Down

0 comments on commit 84b47b1

Please sign in to comment.