From ce5b05f9121155a4f4a8b177cf1b2292275b9baf Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Tue, 23 Mar 2021 12:06:35 -0500 Subject: [PATCH] Add some debug logging to measure how long the CLI build takes. Signed-off-by: Matt Moyer --- test/library/cli.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/library/cli.go b/test/library/cli.go index d68e2439..dac7b8bc 100644 --- a/test/library/cli.go +++ b/test/library/cli.go @@ -1,4 +1,4 @@ -// Copyright 2020 the Pinniped contributors. All Rights Reserved. +// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package library @@ -9,6 +9,7 @@ import ( "path/filepath" "sync" "testing" + "time" "github.com/stretchr/testify/require" @@ -34,8 +35,10 @@ func PinnipedCLIPath(t *testing.T) string { } t.Log("building pinniped CLI binary") + start := time.Now() output, err := exec.Command("go", "build", "-o", path, "go.pinniped.dev/cmd/pinniped").CombinedOutput() require.NoError(t, err, string(output)) + t.Logf("built CLI binary in %s", time.Since(start).Round(time.Millisecond)) // Fill our cache so we don't have to do this again. pinnipedCLIBinaryCache.buf, err = ioutil.ReadFile(path)