diff options
| author | Jes Cok <xigua67damn@gmail.com> | 2025-10-19 19:53:27 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-10-21 08:13:08 -0700 |
| commit | a5a249d6a64508376320bc48546a6a43aebecda7 (patch) | |
| tree | 707720726df7c69b68536f55154a5fb0c2704763 /src/runtime | |
| parent | 694182d77b1a0e3676214ad0e361bdbdafde33a1 (diff) | |
| download | go-a5a249d6a64508376320bc48546a6a43aebecda7.tar.xz | |
all: eliminate unnecessary type conversions
Found by github.com/mdempsky/unconvert
Change-Id: I88ce10390a49ba768a4deaa0df9057c93c1164de
GitHub-Last-Rev: 3b0f7e8f74f58340637f33287c238765856b2483
GitHub-Pull-Request: golang/go#75974
Reviewed-on: https://go-review.googlesource.com/c/go/+/712940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/metrics.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/metrics.go b/src/runtime/metrics.go index 36efef39c0..6ee2c28549 100644 --- a/src/runtime/metrics.go +++ b/src/runtime/metrics.go @@ -469,42 +469,42 @@ func initMetrics() { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gTotal) + out.scalar = in.schedStats.gTotal }, }, "/sched/goroutines/not-in-go:goroutines": { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gNonGo) + out.scalar = in.schedStats.gNonGo }, }, "/sched/goroutines/running:goroutines": { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gRunning) + out.scalar = in.schedStats.gRunning }, }, "/sched/goroutines/runnable:goroutines": { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gRunnable) + out.scalar = in.schedStats.gRunnable }, }, "/sched/goroutines/waiting:goroutines": { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gWaiting) + out.scalar = in.schedStats.gWaiting }, }, "/sched/goroutines-created:goroutines": { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.gCreated) + out.scalar = in.schedStats.gCreated }, }, "/sched/latencies:seconds": { @@ -536,7 +536,7 @@ func initMetrics() { deps: makeStatDepSet(schedStatsDep), compute: func(in *statAggregate, out *metricValue) { out.kind = metricKindUint64 - out.scalar = uint64(in.schedStats.threads) + out.scalar = in.schedStats.threads }, }, "/sync/mutex/wait/total:seconds": { |
