Unverified Commit 477fd420 authored by isdyaufh8o7cq's avatar isdyaufh8o7cq Committed by GitHub

metrics: fix cast omission in cpu_syscall.go (#22262)

fixes an regression which caused build failure on certain platforms
parent e74bd587
...@@ -31,5 +31,5 @@ func getProcessCPUTime() int64 { ...@@ -31,5 +31,5 @@ func getProcessCPUTime() int64 {
log.Warn("Failed to retrieve CPU time", "err", err) log.Warn("Failed to retrieve CPU time", "err", err)
return 0 return 0
} }
return (usage.Utime.Sec+usage.Stime.Sec)*100 + int64(usage.Utime.Usec+usage.Stime.Usec)/10000 //nolint:unconvert return int64(usage.Utime.Sec+usage.Stime.Sec)*100 + int64(usage.Utime.Usec+usage.Stime.Usec)/10000 //nolint:unconvert
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment