aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fix
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2024-06-13 12:38:20 -0400
committerMichael Matloob <matloob@golang.org>2024-06-13 19:19:47 +0000
commitdbe03e4831206d7311e4423c3a988fc48beda2bd (patch)
treea417b2026482689a40634b18a13ed786cc6147d3 /src/cmd/fix
parent956f8a67dd7319bad60c015d982f0b2e95b9f382 (diff)
downloadgo-dbe03e4831206d7311e4423c3a988fc48beda2bd.tar.xz
cmd/go: call telemetry.MaybeChild at start of go command
Call the new telemetry.MaybeChild function at the start of the go command so that the child process logic can be run immediately without running toolchain selection if this is the child process. The Start function in the telemetry shim package has been renamed to OpenCounters to make it clear that that's its only function. The StartWithUpload function in the telemetry shim package has been renamed to MaybeParent because that's its actual effective behavior in cmd/go, the only place it's called: it won't run as the child because MaybeChild has already been called and would have run as the child if the program was the telemetry child, and it won't open counters because telemetry.Start has been called. Checks are added that those functions are always called before so that the function name and comment are accurate. It might make sense to add a true telemetry.MaybeParent function that doesn't try to start the child or open counters to make things a little simpler. Change-Id: Ie81e2418af85cef18ec41f75db66365f6597b8b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/592535 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/fix')
-rw-r--r--src/cmd/fix/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/fix/main.go b/src/cmd/fix/main.go
index b0aabae889..d915ece4ce 100644
--- a/src/cmd/fix/main.go
+++ b/src/cmd/fix/main.go
@@ -65,7 +65,7 @@ func usage() {
}
func main() {
- telemetry.Start()
+ telemetry.OpenCounters()
flag.Usage = usage
flag.Parse()
telemetry.Inc("fix/invocations")