From b74340b1d6b72fc39483d63c6ecc81c45426b617 Mon Sep 17 00:00:00 2001 From: Mya Date: Wed, 25 May 2022 13:24:03 -0500 Subject: [PATCH] scripts/lint: fix timing of lint tasks Change-Id: I068cad315fd05ee235413d8230d454507b0a60e4 --- scripts/lint.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lint.go b/scripts/lint.go index 52cf3bbf9..5ef954af7 100644 --- a/scripts/lint.go +++ b/scripts/lint.go @@ -86,7 +86,9 @@ func main() { start := time.Now() log.Println(prefix, "running") - defer log.Println(prefix, "done", time.Since(start)) + defer func() { + log.Println(prefix, "done", time.Since(start)) + }() _ = cmd.Run() exitCode := cmd.ProcessState.ExitCode() @@ -164,6 +166,11 @@ func main() { commands[1] = append(commands[1], newCommand(ctx, workDir, "golangci-lint", args...)) } + start := time.Now() + defer func() { + log.Println("total time", time.Since(start)) + }() + for _, tier := range commands { for _, cmd := range tier { ok := submit(cmd)