From d79c350916c637de911d93af689a5e4e7ab5a5bb Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Fri, 21 Jun 2024 14:35:14 -0400 Subject: cmd/internal: separate counter package from telemetry package Move the code that opens and increments counters out of the cmd/internal/telemetry package into cmd/internal/telemetry/counter. The telemetry package has dependencies on the upload code, which we do not want to pull into the rest of the go toolchain. For #68109 Change-Id: I463c106819b169177a783de4a7d93377e81f4e3e Reviewed-on: https://go-review.googlesource.com/c/go/+/593976 LUCI-TryBot-Result: Go LUCI Reviewed-by: Robert Findley --- src/cmd/objdump/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/objdump') diff --git a/src/cmd/objdump/main.go b/src/cmd/objdump/main.go index 7554b5500c..b5b0d7f517 100644 --- a/src/cmd/objdump/main.go +++ b/src/cmd/objdump/main.go @@ -41,7 +41,7 @@ import ( "strings" "cmd/internal/objfile" - "cmd/internal/telemetry" + "cmd/internal/telemetry/counter" ) var printCode = flag.Bool("S", false, "print Go code alongside assembly") @@ -58,12 +58,12 @@ func usage() { func main() { log.SetFlags(0) log.SetPrefix("objdump: ") - telemetry.OpenCounters() + counter.Open() flag.Usage = usage flag.Parse() - telemetry.Inc("objdump/invocations") - telemetry.CountFlags("objdump/flag:", *flag.CommandLine) + counter.Inc("objdump/invocations") + counter.CountFlags("objdump/flag:", *flag.CommandLine) if flag.NArg() != 1 && flag.NArg() != 3 { usage() } -- cgit v1.3