mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/go/internal/telemetrystats: count cgo usage
Knowing how many times cgo is used is useful information to have in the local telemetry database. It also opens the door for uploading them in the future if desired. Change-Id: Ia92b11fc489f015bbface7f28ed5a5c2871c44f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/707055 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
This commit is contained in:
parent
eaf28a27fd
commit
f93186fb44
1 changed files with 7 additions and 0 deletions
|
|
@ -32,6 +32,13 @@ func incrementConfig() {
|
||||||
} else {
|
} else {
|
||||||
counter.Inc("go/mode:module")
|
counter.Inc("go/mode:module")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.BuildContext.CgoEnabled {
|
||||||
|
counter.Inc("go/cgo:enabled")
|
||||||
|
} else {
|
||||||
|
counter.Inc("go/cgo:disabled")
|
||||||
|
}
|
||||||
|
|
||||||
counter.Inc("go/platform/target/goos:" + cfg.Goos)
|
counter.Inc("go/platform/target/goos:" + cfg.Goos)
|
||||||
counter.Inc("go/platform/target/goarch:" + cfg.Goarch)
|
counter.Inc("go/platform/target/goarch:" + cfg.Goarch)
|
||||||
switch cfg.Goarch {
|
switch cfg.Goarch {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue