diff --git a/cmd/syft/internal/commands/scan.go b/cmd/syft/internal/commands/scan.go index d9147dace..7db17fb7d 100644 --- a/cmd/syft/internal/commands/scan.go +++ b/cmd/syft/internal/commands/scan.go @@ -7,6 +7,7 @@ import ( "os" "reflect" "strings" + "time" "github.com/hashicorp/go-multierror" "github.com/spf13/cobra" @@ -171,6 +172,11 @@ func validateArgs(cmd *cobra.Command, args []string, err string) error { } func runScan(ctx context.Context, id clio.Identification, opts *scanOptions, userInput string) error { + scanStart := time.Now() + defer func() { + log.Infof("scan completed in %s", time.Since(scanStart).Round(time.Millisecond)) + }() + writer, err := opts.SBOMWriter() if err != nil { return err